[go: up one dir, main page]

File: rules

package info (click to toggle)
sogo 5.12.1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 103,372 kB
  • sloc: objc: 121,808; javascript: 75,271; sh: 2,352; ansic: 2,055; perl: 861; python: 777; sql: 307; makefile: 182; php: 43; xml: 27
file content (66 lines) | stat: -rwxr-xr-x 3,291 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
include /usr/share/GNUstep/debian/config.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
DEB_HOST_ARCH_ENDIAN ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_ENDIAN)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@

override_dh_auto_clean:
	[ ! -f config.make ] || $(MAKE) distclean
	[ ! -f config.make ] || (cd ActiveSync && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp GNUSTEP_INSTALLATION_DOMAIN=SYSTEM OBJCFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" messages=yes clean)
	rm -f config.make

override_dh_auto_build:
	dh_auto_build -- OBJCFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" messages=yes
	(cd ActiveSync && $(MAKE) OBJCFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" messages=yes)

override_dh_auto_configure:
	./configure --with-ssl=ssl --enable-saml2 --enable-mfa

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
ifeq ($(DEB_HOST_ARCH_ENDIAN),little)
	dh_auto_test
else
	-dh_auto_test
endif
endif

override_dh_auto_install:
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp GNUSTEP_INSTALLATION_DOMAIN=SYSTEM OBJCFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" messages=yes install
	(cd ActiveSync && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp GNUSTEP_INSTALLATION_DOMAIN=SYSTEM OBJCFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" messages=yes install)
	mkdir -p debian/tmp/etc/default debian/tmp/etc/cron.d debian/tmp/etc/logrotate.d debian/tmp/usr/share/doc/sogo debian/tmp/usr/lib/tmpfiles.d
	cp Scripts/sogo-default debian/tmp/etc/default/sogo
	cp Scripts/sogo.cron debian/tmp/etc/cron.d/sogo
	cp Scripts/sogo-backup.sh debian/tmp/usr/sbin/sogo-backup
	cp Scripts/logrotate debian/tmp/etc/logrotate.d/sogo
	sed -e 's|/usr/lib/GNUstep|$(GNUSTEP_SYSTEM_LIBRARY)|g' \
	  Apache/SOGo.conf > apache.conf
	cp debian/sogo.tmpfiles.d debian/tmp/usr/lib/tmpfiles.d/sogo.conf
	# Put arch independent files in /usr/share instead of /usr/lib
	mkdir -p debian/tmp/usr/share/GNUstep/SOGo
	mv debian/tmp/usr/lib/*/GNUstep/SOGo/Templates debian/tmp/usr/lib/*/GNUstep/SOGo/WebServerResources debian/tmp/usr/share/GNUstep/SOGo

	# Use packaged 3rd party javascript libraries available in Debian
	rm -f debian/tmp/usr/share/GNUstep/SOGo/WebServerResources/js/vendor/FileSaver.min.js*
	rm -f debian/tmp/usr/share/GNUstep/SOGo/WebServerResources/js/vendor/angular.js
	rm -f debian/tmp/usr/share/GNUstep/SOGo/WebServerResources/js/vendor/angular.min.js*
	rm -f debian/tmp/usr/share/GNUstep/SOGo/WebServerResources/js/vendor/angular-{animate,aria,cookies,messages,sanitize}.js
	rm -f debian/tmp/usr/share/GNUstep/SOGo/WebServerResources/js/vendor/angular-{animate,aria,cookies,messages,sanitize}.min.js*
	rm -f debian/tmp/usr/share/GNUstep/SOGo/WebServerResources/js/vendor/lodash.js
	rm -f debian/tmp/usr/share/GNUstep/SOGo/WebServerResources/js/vendor/lodash.min.js*

	dh_install

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.md

execute_before_dh_link:
# Remove the ActiveSync bundle in advance, otherwise dh_gnustep will
# happily move its Resources to /usr/share in the sogo-common package.
	rm -rf debian/tmp$(GNUSTEP_SYSTEM_LIBRARY)/SOGo/ActiveSync*
	gsdh_gnustep --bundle-dir=SOGo --move-to=sogo-common