| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 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 |
|
|---|
| 20 |
export DH_OPTIONS |
|---|
| 21 |
|
|---|
| 22 |
build: build-stamp |
|---|
| 23 |
build-stamp: |
|---|
| 24 |
dh_testdir |
|---|
| 25 |
/usr/bin/msgfmt po/fr/LC_MESSAGES/alternc-admintools.po -o po/fr/LC_MESSAGES/alternc-admintools.mo |
|---|
| 26 |
touch build-stamp |
|---|
| 27 |
|
|---|
| 28 |
clean: |
|---|
| 29 |
dh_testdir |
|---|
| 30 |
dh_testroot |
|---|
| 31 |
rm -f build-stamp |
|---|
| 32 |
debconf-updatepo |
|---|
| 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 |
|
|---|
| 43 |
cp -r etc/* debian/alternc/etc |
|---|
| 44 |
cp -r install/* debian/alternc/usr/share/alternc/install |
|---|
| 45 |
cp -r bureau/* debian/alternc/var/alternc/bureau |
|---|
| 46 |
(cd src && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc) |
|---|
| 47 |
|
|---|
| 48 |
VERSION=`sed -ne 's/^[^(]*(\([^)]*\)).*/\1/;1p' debian/changelog` |
|---|
| 49 |
sed -i -e "s/@@REPLACED_DURING_BUILD@@/${VERSION}/" debian/alternc/var/alternc/bureau/class/local.php |
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
chmod 755 debian/alternc/etc/alternc |
|---|
| 53 |
chmod 644 debian/alternc/etc/alternc/phpmyadmin.inc.php |
|---|
| 54 |
chown -R root:www-data debian/alternc/var/alternc/bureau |
|---|
| 55 |
chmod -R 644 debian/alternc/var/alternc/bureau |
|---|
| 56 |
chmod -R a+X debian/alternc/var/alternc/bureau |
|---|
| 57 |
chown -R www-data:www-data debian/alternc/var/alternc/dns |
|---|
| 58 |
chown -R www-data:www-data debian/alternc/var/alternc/html |
|---|
| 59 |
chown -R www-data:www-data debian/alternc/var/run/alternc |
|---|
| 60 |
chown -R www-data:www-data debian/alternc/var/log/alternc |
|---|
| 61 |
chown -R www-data:www-data debian/alternc/var/alternc/tmp |
|---|
| 62 |
|
|---|
| 63 |
for sub in dns dns/redir mail html apacheconf; do \ |
|---|
| 64 |
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z _ 0 1 2 3 4 5 6 7 8 9; do \ |
|---|
| 65 |
mkdir -p debian/alternc/var/alternc/${sub}/${i} ;\ |
|---|
| 66 |
chown www-data debian/alternc/var/alternc/${sub}/${i} ;\ |
|---|
| 67 |
done ;\ |
|---|
| 68 |
done |
|---|
| 69 |
|
|---|
| 70 |
chmod a+x debian/alternc/usr/share/alternc/install/alternc.install |
|---|
| 71 |
chmod a+x debian/alternc/usr/share/alternc/install/dopo.sh |
|---|
| 72 |
chmod a+x debian/alternc/usr/share/alternc/install/mysql.sh |
|---|
| 73 |
chmod a+x debian/alternc/usr/share/alternc/install/newone.php |
|---|
| 74 |
chmod a+x debian/alternc/usr/share/alternc/install/reset_root.php |
|---|
| 75 |
chmod a+x debian/alternc/usr/share/alternc/install/upgrade_check.sh |
|---|
| 76 |
chmod a+x debian/alternc/usr/share/alternc/install/upgrades/*.php |
|---|
| 77 |
chmod a+x debian/alternc/usr/share/alternc/install/upgrades/*.sh |
|---|
| 78 |
|
|---|
| 79 |
install tools/top_http_users debian/alternc/usr/bin |
|---|
| 80 |
install tools/top_mysql_users debian/alternc/usr/bin |
|---|
| 81 |
install tools/top_ftp_users debian/alternc/usr/bin |
|---|
| 82 |
install tools/get_domains_by_account debian/alternc/usr/bin |
|---|
| 83 |
install tools/get_account_by_domain debian/alternc/usr/bin |
|---|
| 84 |
install -m 644 po/fr/LC_MESSAGES/alternc-admintools.mo debian/alternc/usr/share/locale/fr/LC_MESSAGES/ |
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
find debian/alternc/var/alternc/bureau/locales/ \ |
|---|
| 88 |
-maxdepth 1 -type f -exec rm -f {} \; |
|---|
| 89 |
|
|---|
| 90 |
/usr/bin/find debian/alternc -depth -type d -name CVS -exec rm {} -rf \; |
|---|
| 91 |
/usr/bin/find debian/alternc -depth -type d -name .svn -exec rm {} -rf \; |
|---|
| 92 |
cp debian/lintian-override \ |
|---|
| 93 |
debian/alternc/usr/share/lintian/overrides/alternc |
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 |
binary-common: build install |
|---|
| 101 |
dh_testdir |
|---|
| 102 |
dh_testroot |
|---|
| 103 |
dh_installchangelogs |
|---|
| 104 |
dh_installdocs |
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
dh_installdebconf |
|---|
| 108 |
dh_installlogrotate |
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
dh_installman man/* |
|---|
| 114 |
dh_installcron |
|---|
| 115 |
|
|---|
| 116 |
dh_strip |
|---|
| 117 |
dh_link |
|---|
| 118 |
dh_compress |
|---|
| 119 |
|
|---|
| 120 |
|
|---|
| 121 |
|
|---|
| 122 |
dh_installdeb |
|---|
| 123 |
dh_perl |
|---|
| 124 |
dh_shlibdeps |
|---|
| 125 |
dh_gencontrol -- -cdebian/control |
|---|
| 126 |
dh_md5sums |
|---|
| 127 |
dh_builddeb |
|---|
| 128 |
|
|---|
| 129 |
|
|---|
| 130 |
binary-indep: build install binary-common |
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 |
binary-arch: build install binary-common |
|---|
| 136 |
|
|---|
| 137 |
|
|---|
| 138 |
|
|---|
| 139 |
|
|---|
| 140 |
|
|---|
| 141 |
|
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
|
|---|
| 145 |
binary: binary-common |
|---|
| 146 |
|
|---|
| 147 |
.PHONY: build clean binary install |
|---|