File: rules

package info (click to toggle)
dokuwiki 0.0.20180422.a-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 29,632 kB
  • sloc: php: 175,386; javascript: 7,016; sh: 665; xml: 403; perl: 216; makefile: 70
file content (93 lines) | stat: -rwxr-xr-x 4,176 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DESTDIR=$(CURDIR)/debian/dokuwiki

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	slimit debian/missing-sources/lib/scripts/jquery/jquery-migrate.js > lib/scripts/jquery/jquery-migrate.min.js

override_dh_install:
	dh_install
	# Remove embedded libraries: we use packaged ones instead
	rm -rf $(DESTDIR)/usr/share/dokuwiki/vendor/easybook
	rm -rf $(DESTDIR)/usr/share/dokuwiki/vendor/geshi
	rm -rf $(DESTDIR)/usr/share/dokuwiki/vendor/paragonie # random_compat
	rm -rf $(DESTDIR)/usr/share/dokuwiki/vendor/phpseclib
	rm -rf $(DESTDIR)/usr/share/dokuwiki/vendor/simplepie
	rm -f $(DESTDIR)/usr/share/dokuwiki/lib/scripts/jquery/jquery.*
	rm -f $(DESTDIR)/usr/share/dokuwiki/lib/scripts/jquery/jquery-ui.*
	rm -f $(DESTDIR)/usr/share/dokuwiki/lib/scripts/jquery/update.sh
	rm -f $(DESTDIR)/usr/share/dokuwiki/inc/lang/*/jquery.ui.datepicker.js
	# Already installed to /var/lib/
	rm -rf $(DESTDIR)/usr/share/dokuwiki/lib/tpl
	rm -rf $(DESTDIR)/usr/share/dokuwiki/lib/plugins
	# Remove useless licensing information (already in debian/copyright!)
	# and READMEs
	rm -f $(DESTDIR)/var/lib/dokuwiki/lib/tpl/dokuwiki/images/license.txt
	rm -f $(DESTDIR)/var/lib/dokuwiki/lib/tpl/dokuwiki/images/pagetools/license.txt
	rm -f $(DESTDIR)/var/lib/dokuwiki/lib/plugins/extension/images/license.txt
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/splitbrain/php-archive/LICENSE
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/composer/LICENSE
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/marcusschwarz/lesserphp/LICENSE
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/splitbrain/php-cli/LICENSE
	rm -f $(DESTDIR)/usr/share/dokuwiki/lib/images/admin/README
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/README
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/aziraphale/email-address-validator/README.md
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/marcusschwarz/lesserphp/HISTORY.md
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/marcusschwarz/lesserphp/README.md
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/openpsa/universalfeedcreator/README.md
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/splitbrain/php-archive/README.md
	rm -f $(DESTDIR)/usr/share/dokuwiki/vendor/splitbrain/php-cli/README.md
	rm -f $(DESTDIR)/var/lib/dokuwiki/lib/plugins/authpdo/README
	rm -f $(DESTDIR)/var/lib/dokuwiki/lib/plugins/styling/README
	rm -f $(DESTDIR)/usr/share/dokuwiki/lib/images/README
	# Remove some information about generating building files that are not useful to users
	# (they may be useful for people seeking to rebuild them, which will find them in the
	# source)
	rm -f $(DESTDIR)/usr/share/dokuwiki/lib/images/fileicons/README
	# Create plugins.local.php
	touch $(DESTDIR)/etc/dokuwiki/plugins.local.php
	# Remove dummy files that only exist to help some archiving tools to
	# create empty directories (for more information, see #800540 and
	# <https://www.dokuwiki.org/faq:dummy_files>).
	rm -f $(DESTDIR)/var/lib/dokuwiki/data/_dummy
	rm -f $(DESTDIR)/var/lib/dokuwiki/data/*/_dummy

override_dh_fixperms:
	dh_fixperms

	# Fixe erroneous executable permission on some files
	chmod -x $(DESTDIR)/usr/share/dokuwiki/inc/lang/az/*

	# Allow www-data to write pages and account files.
	chown -R www-data.root $(DESTDIR)/var/lib/dokuwiki/data
	chown -R www-data.root $(DESTDIR)/var/lib/dokuwiki/acl
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/acl
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data/attic
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data/cache
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data/index
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data/locks
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data/media
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data/meta
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data/pages
	chmod 700 $(DESTDIR)/var/lib/dokuwiki/data/tmp

	# Command-line executables
	chmod +x $(DESTDIR)/usr/share/dokuwiki/bin/*.php
	
	# Standard permission for webapp configuration
	chown -R root.www-data $(DESTDIR)/etc/dokuwiki

override_dh_installchangelogs:
	dh_installchangelogs debian/changelog.upstream

override_dh_auto_clean:
	dh_auto_clean
	rm -f lib/scripts/jquery/jquery-migrate.min.js