Merge remote-tracking branch 'origin/new/bug_8233'
[koha.git] / debian / rules
1 #!/usr/bin/make -f
2
3 TMP = $(CURDIR)/debian/tmp
4
5 # Make "perl Makefile.PL" be non-interactive.
6 export PERL_MM_USE_DEFAULT=1
7
8 %:
9         dh $@ --fail-missing
10
11 override_dh_gencontrol:
12         debian/bd-to-depends >> debian/koha-common.substvars
13         dh_gencontrol
14
15 override_dh_auto_install:
16         dh_auto_install
17         rm $(TMP)/etc/koha/README.txt
18         rm $(TMP)/etc/koha/SIPconfig.xml
19         rm -r $(TMP)/usr/share/koha/doc
20         rm -r $(TMP)/var/run
21         rm -r $(TMP)/var/lock
22         rm $(TMP)/var/log/koha/README
23         rm $(TMP)/etc/koha/searchengine/solr/config.yaml
24         rm $(TMP)/etc/koha/searchengine/solr/indexes.yaml
25         rm $(TMP)/etc/koha/solr/indexes.yaml
26 #       rm $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js
27 #       ln -s /usr/share/javascript/jquery/jquery.js \
28 #          $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js
29 #       rm $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js
30 #       ln -s /usr/share/javascript/jquery/jquery.js \
31 #          $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js
32         rm -r \
33                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce
34                 mkdir -p $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce/jscripts
35         ln -s /usr/share/tinymce2/www \
36               $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce/jscripts/tiny_mce
37         rm -r \
38                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/yui
39         ln -s /usr/share/javascript/yui \
40                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/yui
41         rm -r \
42               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/lib/yui
43         ln -s /usr/share/javascript/yui \
44          $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/lib/yui
45         install -d $(TMP)/etc/apache2/sites-available
46         install -d $(TMP)/etc/apache2/sites-enabled
47         install -d $(TMP)/etc/apache2/conf.d
48         ln -s ../../koha/koha-httpd.conf $(TMP)/etc/apache2/sites-available/koha
49         ln -s ../sites-available/koha $(TMP)/etc/apache2/sites-enabled/koha
50         install -m 0644 debian/koha.apache-ports $(TMP)/etc/apache2/conf.d/koha
51         sed -i '/^<VirtualHost 127.0.1.1:/s//<VirtualHost *:/' \
52                 $(TMP)/etc/koha/koha-httpd.conf
53         mv $(TMP)/etc/koha/koha-conf.xml $(TMP)/usr/share/koha/koha-conf.xml.in
54         sed -i $(TMP)/usr/share/koha/koha-conf.xml.in \
55                 -e '/^ <user>/s/>.*</>_DBC_DBUSER_</' \
56                 -e '/^ <pass>/s/>.*</>_DBC_DBPASS_</'
57         install -m 0644 koha-tmpl/opac-tmpl/lib/yui/skin.css \
58          koha-tmpl/opac-tmpl/lib/yui/reset-fonts-grids.css \
59                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
60         install -m 0644 koha-tmpl/opac-tmpl/lib/yui/skin.css \
61          koha-tmpl/opac-tmpl/lib/yui/reset-fonts-grids.css \
62                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
63         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow-disabled.png \
64                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
65         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow-disabled.png \
66                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
67         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow.png \
68                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
69         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow.png \
70                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
71         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-active.png \
72                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
73         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-active.png \
74                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
75         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-disabled.png \
76                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
77         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-disabled.png \
78                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
79         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-focus.png \
80                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
81         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-focus.png \
82                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
83         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-hover.png \
84                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
85         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow-hover.png \
86                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
87         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow.png \
88                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
89         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/split-button-arrow.png \
90                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
91         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/sprite.png \
92                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
93         install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/sprite.png  \
94                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
95         sed -i -e 's:url(.*/reset-fonts-grids.css.*):url(reset-fonts-grids.css):' \
96                    -e 's:url(.*/skin.css.*):url(skin.css):' \
97                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/opac.css \
98                 $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/sco.css \
99                 $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css/staff-global*.css
100         mkdir -p $(TMP)/debian/tmp_docbook
101         xsltproc --output $(TMP)/debian/tmp_docbook/ \
102             /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
103             debian/docs/*.xml