Add mysql database stuff
[mspang/pyceo.git] / debian / rules
index aca0a06..90c0602 100755 (executable)
@@ -1,10 +1,9 @@
 #!/usr/bin/make -f
 
 CFLAGS  := -g -O2 -fstack-protector-all -fPIE
-LDFLAGS := -pie
+LDFLAGS := -pie -Wl,--as-needed
 
 build:
-       python setup.py -q build
        cd src && make CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 clean:
@@ -12,21 +11,27 @@ clean:
        dh_testroot
        dh_clean
        $(MAKE) -C src clean
-       python setup.py -q clean -a
+       python setup.py  -q clean -a --build-base=build-ceo
+       python setupd.py -q clean -a --build-base=build-ceod
+       rm -rf build-ceo build-ceod
 
 install: build
        dh_testdir
        dh_testroot
        dh_installdirs
-       python setup.py -q install --no-compile -O0 --root=debian/ceo
-       $(MAKE) -C src DESTDIR=$(PWD)/debian/ceo PREFIX=/usr install
-       
+       python setup.py  -q build --build-base=build-ceo  install --no-compile -O0 --prefix=/usr --root=debian/ceo-python
+       python setupd.py -q build --build-base=build-ceod install --no-compile -O0 --prefix=/usr --root=debian/ceo-daemon \
+            --install-scripts=/usr/lib/ceod
+       $(MAKE) -C src DESTDIR=$(CURDIR)/debian/ceo-clients PREFIX=/usr install_clients
+       $(MAKE) -C src DESTDIR=$(CURDIR)/debian/ceo-daemon PREFIX=/usr install_daemon
+
 binary-arch: build install
        dh_testdir
        dh_testroot
-       dh_installchangelogs 
+       dh_installchangelogs
        dh_installdocs
        dh_installexamples
+       dh_installinit --name ceod -- start 95 2 3 4 5 . stop 05 0 1 6 .
        dh_install
        dh_installman
        dh_link