Permalink
Browse files

made the python modules make install compatible so the debian package…

…r has an easier time
  • Loading branch information...
1 parent 6a276f7 commit eec6b16c3c2f2ba881efc7a24d1416230ae87ca8 @srlindsay srlindsay committed Oct 19, 2009
Showing with 29 additions and 13 deletions.
  1. +3 −0 Makefile
  2. +7 −1 python-lounge/Makefile
  3. +2 −0 replicator/Makefile
  4. +7 −1 smartproxy/Makefile
  5. +3 −4 smartproxy/setup.py
  6. +1 −1 smartproxy/smartproxy.tac
  7. +3 −3 smartproxy/smartproxy.xml
  8. +3 −3 smartproxy/smartproxyd
View
@@ -8,13 +8,16 @@ all: $(SUBDIRS)
install: $(SUBDIRS)
$(MAKE) -C dumbproxy install
$(MAKE) -C smartproxy install
+ $(MAKE) -C replicator install
$(MAKE) -C python-lounge install
clean:
$(MAKE) -C dumbproxy clean
$(MAKE) -C smartproxy clean
$(MAKE) -C python-lounge clean
+distclean:
+ echo "distclean stub"
SUBDIRS: $(SUBDIRS)
View
@@ -8,13 +8,19 @@ ifeq ($(PY_VERSION), Python 2.3.4)
PY_EXTRA=
endif
+ifeq ($(strip $(DESTDIR)),)
+ root=
+else
+ root=--root $(DESTDIR)
+endif
+
.PHONY: default install
default:
python setup.py build
install:
- python setup.py install --root $(DESTDIR)
+ python setup.py install $(root)
.PHONY: test
test:
View
@@ -0,0 +1,2 @@
+install:
+ cp replication_notifier.py $(DESTDIR)/usr/lounge/bin/replication_notifier.py
View
@@ -8,11 +8,17 @@ ifeq ($(PY_VERSION), Python 2.3.4)
PY_EXTRA=
endif
+ifeq ($(strip $(DESTDIR)),)
+ root=
+else
+ root=--root $(DESTDIR)
+endif
+
default:
python setup.py build
install:
- python setup.py install --root $(DESTDIR)
+ python setup.py install $(root)
#default:
# echo $(PY_VERSION)
View
@@ -1,14 +1,13 @@
from distutils.core import setup
import os
-tac_files = ('/var/lounge/etc', ['smartproxy.tac'])
init_files = ('/etc/init.d/', ['smartproxyd'])
-conf_files = ('/var/lounge/etc/smartproxy/', ['smartproxy.xml'])
+conf_files = ('/etc/lounge/', ['smartproxy.xml', 'smartproxy.tac'])
check_files = ('/root/bin/', ['check-smartproxy.py'])
cron_files = ('/etc/cron.d/', ['check-smartproxy'])
-cache_files = ('/var/lounge/lib/smartproxy', ['cache.dat'])
+cache_files = ('/usr/lounge/lib/smartproxy', ['cache.dat'])
-data_files = [tac_files, init_files, conf_files, check_files, cron_files, cache_files]
+data_files = [init_files, conf_files, check_files, cron_files, cache_files]
py_modules = ["smartproxy.proxy", "smartproxy.fetcher", "smartproxy.reducer"]
@@ -10,7 +10,7 @@ from twisted.python import log
from lounge.prefs import Prefs
from smartproxy.proxy import HTTPProxy
-prefs = Prefs(os.environ.get("PREFS",'/var/lounge/etc/smartproxy/smartproxy.xml'))
+prefs = Prefs(os.environ.get("PREFS",'/etc/lounge/smartproxy.xml'))
http_port = prefs.get_pref("/http_port")
@@ -3,9 +3,9 @@
<pref version='1' name='/'>
<pref name='log_level' type='string' value='INFO'/>
<pref name='http_port' type='int' value='2008'/>
- <pref name='proxy_conf' type='string' value='/var/lounge/etc/shards.conf'/>
- <pref name='logfile' type='string' value='/var/lounge/log/smartproxy.log'/>
+ <pref name='proxy_conf' type='string' value='/etc/lounge/shards.conf'/>
+ <pref name='logfile' type='string' value='/var/log/lounge/smartproxy.log'/>
<pref name='reduce_pool_size' type='int' value='32'/>
<pref name='client_pool_size' type='int' value='16'/>
- <pref name='cache_file_path' type='string' value='/var/lounge/lib/smartproxy/cache.dat'/>
+ <pref name='cache_file_path' type='string' value='/usr/lounge/lib/smartproxy/cache.dat'/>
</pref>
View
@@ -13,10 +13,10 @@ TWISTD_BINARY=`which twistd`
[ -x $TWISTD_BINARY ] || (echo "missing twistd" && exit 1)
TWISTED_NAME='smartproxy'
-TWISTED_FILE='/var/lounge/etc/smartproxy.tac'
-TWISTED_PID_DIR='/var/lounge/run/pid'
+TWISTED_FILE='/etc/lounge/smartproxy.tac'
+TWISTED_PID_DIR='/var/run/pid'
TWISTED_PID="$TWISTED_PID_DIR/smartproxyd.pid"
-TWISTED_LOG='/var/lounge/log/smartproxyd.log'
+TWISTED_LOG='/var/log/lounge/smartproxyd.log'
USER=`id -u root`
GROUP=`id -g root`

0 comments on commit eec6b16

Please sign in to comment.