Code

patches: Added 02-php5.4.diff -- use ob_end_flush() in favor of ob_end_clean()
[pkg-libkohana2-php.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for kohana2
3 #
4 # Written by Sven Velt <sven@velt.de> and Sebastian Harl <tokkee@debian.org>.
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 get-orig-source:
10         uscan --force --verbose --repack --rename
12 build: build-stamp
13 build-stamp:
14         dh_testdir
16         touch $@
18 clean:
19         dh_testdir
20         dh_testroot
21         rm -f build-stamp
23         dh_clean
25 install: build
26         dh_testdir
27         dh_testroot
28         dh_prep
29         dh_installdirs -A
31         cp -a system debian/libkohana2-php/usr/share/php/kohana2/
33         # install modules
34         cp -a modules debian/libkohana2-modules-php/usr/share/php/kohana2/
36         # move config to /etc
37         mv debian/libkohana2-php/usr/share/php/kohana2/system/config \
38                 debian/libkohana2-php/etc/kohana2/system
39         ln -s /etc/kohana2/system/config \
40                 debian/libkohana2-php/usr/share/php/kohana2/system/config
42         ( \
43                 set -e; \
44                 cd debian/libkohana2-modules-php/usr/share/php/kohana2/modules; \
45                 for config in */config; do \
46                         mkdir ../../../../../etc/kohana2/modules/$${config%\/*}; \
47                         mv $$config ../../../../../etc/kohana2/modules/$${config%\/*}; \
48                         ln -s /etc/kohana2/modules/$$config $$config; \
49                 done \
50         )
52         # remove local copy of the DejaVu fonts
53         rm -rf debian/libkohana2-php/usr/share/php/kohana2/system/fonts
55         # replace jQuery with a symlink to the JavaScript provided by libjs-jquery
56         rm -f debian/libkohana2-modules-php/usr/share/php/kohana2/modules/kodoc/views/kodoc/media/js/jquery.js
57         ln -s /usr/share/javascript/jquery/jquery.js \
58                 debian/libkohana2-modules-php/usr/share/php/kohana2/modules/kodoc/views/kodoc/media/js/jquery.js
60         # fix permissions
61         for file in `find debian/libkohana2-* -name '*.php'`; do \
62                 chmod 644 $$file; \
63         done
65         # remove empty directories
66         rmdir debian/libkohana2-php/usr/share/php/kohana2/system/i18n/el_GR/
67         rmdir debian/libkohana2-php/usr/share/php/kohana2/system/tests/
69         rmdir debian/libkohana2-modules-php/usr/share/php/kohana2/modules/archive/i18n/el_GR/
70         rmdir debian/libkohana2-modules-php/usr/share/php/kohana2/modules/auth/controllers/
71         rmdir debian/libkohana2-modules-php/usr/share/php/kohana2/modules/auth/views/
72         rmdir debian/libkohana2-modules-php/usr/share/php/kohana2/modules/kodoc/views/kodoc/media/css/
73         rmdir debian/libkohana2-modules-php/usr/share/php/kohana2/modules/payment/i18n/el_GR/
74         rmdir debian/libkohana2-modules-php/usr/share/php/kohana2/modules/payment/i18n/es_AR/
75         rmdir debian/libkohana2-modules-php/usr/share/php/kohana2/modules/payment/i18n/zh_CN/
77 binary-indep: install
78         dh_testdir
79         dh_testroot
80         dh_installchangelogs -i
81         dh_installdocs -i
82         dh_installexamples -i
83         dh_lintian -i
84         dh_installman -i
85         dh_link -i
86         dh_compress -i
87         dh_fixperms -i
88         dh_installdeb -i
89         dh_gencontrol -i
90         dh_md5sums -i
91         dh_builddeb -i
93 binary-arch: install
95 binary: binary-indep binary-arch
96 .PHONY: build clean binary-indep binary-arch binary install configure