File: rules

package info (click to toggle)
ocsinventory-server 2.8.1%2Bdfsg1%2B~2.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 23,212 kB
  • sloc: javascript: 318,983; php: 29,162; perl: 8,925; sql: 5,101; xml: 2,902; sh: 1,662; python: 77; makefile: 29
file content (47 lines) | stat: -rwxr-xr-x 1,892 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
#!/usr/bin/make -f
# -*- makefile -*-

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

TMPSERVERDIR=$(CURDIR)/debian/ocsinventory-server
TMPREPORTDIR=$(CURDIR)/debian/ocsinventory-reports
LOGPATH=$(TMPREPORTDIR)/var/log/ocsinventory-reports

%:
	dh $@ --sourcedirectory=Apache --with=apache2

override_dh_clean:
	dh_clean -X main_menu.xml.bak

override_dh_install:
	dh_install -XChanges -XLICENSE.md -XLICENCE
	# Remove a few empty dirs generated by dh_install:
	# Don't remove plugins/main_sections/conf/old_conf/
	rm -vf $(TMPREPORTDIR)/usr/share/ocsinventory-reports/LICENSE
	find $(TMPREPORTDIR)/usr/share/ocsinventory-reports -name README -delete
	find $(TMPREPORTDIR)/usr/share/ocsinventory-reports -name LICENSE -delete
	find $(TMPREPORTDIR)/usr/share/ocsinventory-reports -name '*.md' -delete

override_dh_installchangelogs:
	dh_installchangelogs -p ocsinventory-reports ocsreports/Changes
	dh_installchangelogs -p ocsinventory-server Apache/Changes

override_dh_fixperms:
	dh_fixperms
	# fix permissions for scripts and images
	find $(TMPREPORTDIR)/usr/share/ocsinventory-reports -type f -exec chmod a-x {} \;
	# fix the permissions for the .pl scripts
	find $(TMPSERVERDIR)/usr/share/ocsinventory-server -name '*.pl' -exec chmod +x {} \;
	find $(TMPREPORTDIR)/usr/share/ocsinventory-reports -name '*.pl' -exec chmod +x {} \;
	# remove doc files
	rm -v $(TMPSERVERDIR)/usr/share/ocsinventory-server/binutils/ocs-errors \
		$(TMPSERVERDIR)/usr/share/ocsinventory-server/binutils/*.README
	# fix permissions for PHP cron file
	chmod 755 $(TMPREPORTDIR)/usr/share/ocsinventory-reports/tools/cron_mailer.php
	chmod -R g-w $(LOGPATH)
	for dirname in logs scripts; do \
		chown -R www-data:www-data $(LOGPATH)/$$dirname; \
	done
	#chown -R www-data:www-data $(TMPREPORTDIR)/usr/share/ocsinventory-reports
	chown -R www-data:adm $(TMPSERVERDIR)/var/log/ocsinventory-server