summaryrefslogtreecommitdiff
path: root/notepadpp/debian/rules
blob: 99bae2a1282d0ae02c681ffa8bfed0ad4ad7c31d (plain)
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
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
#export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export _prefix=/usr
export _datadir="${_prefix}/share"
export appname=notepadpp
export appname_32=notepadpp-bin32
export appname_64=notepadpp-bin64
export appname_common=notepadpp-common
export appdir_32=notepadpp32
export appdir_64=notepadpp64
export debuilddir="debian"
export buildroot="${debuilddir}/${appname}"
export buildroot_common="${debuilddir}/${appname_common}"
export buildroot_32="${debuilddir}/${appname_32}"
export buildroot_64="${debuilddir}/${appname_64}"

%:
	dh $@

override_dh_fixperms:
	dh_fixperms
	chmod 0666 ${buildroot_32}${_datadir}/${appdir_32}/config.xml || :
	chmod 0666 ${buildroot_32}${_datadir}/${appdir_32}/session.xml || :
	chmod 0666 ${buildroot_32}${_datadir}/${appdir_32}/shortcuts.xml || :
	chmod 0666 ${buildroot_32}${_datadir}/${appdir_32}/stylers.xml || :
	chmod 0777 ${buildroot_32}${_datadir}/${appdir_32}/backup || :
	chmod 0666 ${buildroot_64}${_datadir}/${appdir_64}/config.xml || :
	chmod 0666 ${buildroot_64}${_datadir}/${appdir_64}/session.xml || :
	chmod 0666 ${buildroot_64}${_datadir}/${appdir_64}/shortcuts.xml || :
	chmod 0666 ${buildroot_64}${_datadir}/${appdir_64}/stylers.xml || :
	chmod 0777 ${buildroot_64}${_datadir}/${appdir_64}/backup || :

override_dh_auto_install:
	dh_auto_install
	# fix the *model.xml files
	mkdir -p ${buildroot_32}${_datadir}/${appdir_32}/backup ${buildroot_64}${_datadir}/${appdir_64}/backup
	install -m0644 ${appname_32}/langs.model.xml ${buildroot_32}${_datadir}/${appdir_32}/langs.xml
	install -m0644 ${appname_64}/langs.model.xml ${buildroot_64}${_datadir}/${appdir_64}/langs.xml
bgstack15