Add init script for ceod
[mspang/pyceo.git] / debian / rules
1 #!/usr/bin/make -f
2
3 CFLAGS  := -g -O2 -fstack-protector-all -fPIE
4 LDFLAGS := -pie -Wl,--as-needed
5
6 build:
7         python setup.py -q build
8         cd src && make CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
9
10 clean:
11         dh_testdir
12         dh_testroot
13         dh_clean
14         $(MAKE) -C src clean
15         python setup.py -q clean -a
16
17 install: build
18         dh_testdir
19         dh_testroot
20         dh_installdirs
21         python setup.py -q install --no-compile -O0 --prefix=/usr --root=debian/ceo-gui
22         $(MAKE) -C src DESTDIR=$(CURDIR)/debian/ceo-clients PREFIX=/usr install_clients
23         $(MAKE) -C src DESTDIR=$(CURDIR)/debian/ceo-daemon PREFIX=/usr install_daemon
24
25 binary-arch: build install
26         dh_testdir
27         dh_testroot
28         dh_installchangelogs
29         dh_installdocs
30         dh_installexamples
31         dh_installinit --name ceod -- start 95 2 3 4 5 . stop 05 0 1 6 .
32         dh_install
33         dh_installman
34         dh_link
35         dh_strip
36         dh_compress
37         dh_fixperms
38         dh_pysupport
39         dh_installdeb
40         dh_shlibdeps
41         dh_gencontrol
42         dh_md5sums
43         dh_builddeb
44
45 binary-indep:
46
47 binary: binary-indep binary-arch
48
49 .PHONY: build clean binary-indep binary-arch binary install