root/alternc/branches/larpoux-unstable/debian/rules

Revision 803, 4.1 kB (checked in by root, 3 years ago)

Remove .svn folders during debian package build

Line 
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # This file is public domain software, originally written by Joey Hess.
4 #
5 # This version is for a multibinary package. It also allows you to build any
6 # of the binary packages independantly, via binary-<package> targets.
7
8 # Uncomment this to turn on verbose mode.
9 export DH_VERBOSE=1
10 export VERSION=`head -1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/'`
11
12 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
13         CFLAGS += -g
14 endif
15 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
16         INSTALL_PROGRAM += -s
17 endif
18
19 # This has to be exported to make some magic below work.
20 export DH_OPTIONS
21
22 build: build-stamp
23 build-stamp:
24         dh_testdir
25         (cd src && $(MAKE))
26         touch build-stamp
27
28 clean:
29         dh_testdir
30         dh_testroot
31         rm -f build-stamp
32         (cd src/ && $(MAKE) clean)
33         dh_clean
34
35 install: DH_OPTIONS=
36 install: build
37         dh_testdir
38         dh_testroot
39         dh_clean -k
40         dh_installdirs
41
42         # Install
43         cp -r etc/* debian/alternc/etc
44         cp -r install/* debian/alternc/usr/share/alternc/install
45         ln -s /usr/share/alternc/install/alternc.install \
46               debian/alternc/usr/sbin/alternc.install
47         cp -r bureau/* debian/alternc/var/alternc/bureau
48         ln -s /etc/alternc/menulist.txt debian/alternc/var/alternc/bureau/admin
49         (cd src && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc)
50         # Fix permisions
51         chmod 751 debian/alternc/etc/alternc
52         chmod 644 debian/alternc/etc/alternc/phpmyadmin.inc.php
53         chown -R root:www-data debian/alternc/var/alternc/bureau
54         chmod -R 640 debian/alternc/var/alternc/bureau
55         chmod -R a+X debian/alternc/var/alternc/bureau
56         chown -R www-data:www-data debian/alternc/var/alternc/dns
57         chown -R www-data:www-data debian/alternc/var/alternc/html
58         chown -R www-data:www-data debian/alternc/var/run/alternc
59         chown -R www-data:www-data debian/alternc/var/log/alternc
60
61         chmod a+x debian/alternc/usr/share/alternc/install/alternc.install
62         chmod a+x debian/alternc/usr/share/alternc/install/dopo.sh
63         chmod a+x debian/alternc/usr/share/alternc/install/mysql.sh
64         chmod a+x debian/alternc/usr/share/alternc/install/newone.php
65         chmod a+x debian/alternc/usr/share/alternc/install/reset_root.php
66         chmod a+x debian/alternc/usr/share/alternc/install/upgrade_check.sh
67         chmod a+x debian/alternc/usr/share/alternc/install/upgrades/0.9.1.sh
68         chmod a+x debian/alternc/usr/share/alternc/install/upgrades/0.9.2.php
69
70         # Remove helpers files from l18n dir
71         find debian/alternc/var/alternc/bureau/locales/ \
72                 -maxdepth 1 -type f -exec rm -f {} \;
73         # Remove CVS directories
74         /usr/bin/find debian/alternc -depth -type d -name CVS -exec rm {} -rf \;
75         /usr/bin/find debian/alternc -depth -type d -name .svn -exec rm {} -rf \;
76         cp debian/lintian-override \
77                 debian/alternc/usr/share/lintian/overrides/alternc
78
79 # This single target is used to build all the packages, all at once, or
80 # one at a time. So keep in mind: any options passed to commands here will
81 # affect _all_ packages. Anything you want to only affect one package
82 # should be put in another target, such as the install target.
83
84 binary-common: build install
85         dh_testdir
86         dh_testroot
87         dh_installchangelogs
88         dh_installdocs
89 #       dh_installexamples
90 #       dh_installmenu
91         dh_installdebconf
92         dh_installlogrotate
93 #       dh_installemacsen
94 #       dh_installpam
95 #       dh_installmime
96 #       dh_installinit
97 #       dh_installman
98         dh_installcron
99 #       dh_installinfo
100 #       dh_undocumented
101 #       dh_installman
102         dh_strip
103         dh_link
104         dh_compress
105 #we handle our own perms
106 #       dh_fixperms
107 #       dh_makeshlibs
108         dh_installdeb
109         dh_perl
110 #       dh_shlibdeps
111         dh_gencontrol -- -cdebian/control
112         dh_md5sums
113         dh_builddeb
114
115 # Build architecture independant packages using the common target.
116 binary-indep: build install binary-common
117 # (Uncomment this next line if you have such packages.)
118 #        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
119
120 # Build architecture dependant packages using the common target.
121 binary-arch: build install binary-common
122 #       $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
123
124 # Any other binary targets build just one binary package at a time.
125 # binary-%: build install
126 #       make -f debian/rules binary-common DH_OPTIONS=-p$*
127
128 # binary: binary-indep binary-arch
129 # .PHONY: build clean binary-indep binary-arch binary install
130
131 binary: binary-common
132
133 .PHONY: build clean binary install
Note: See TracBrowser for help on using the browser.