File: rules

package info (click to toggle)
suck 4.3.4-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 1,148 kB
  • sloc: ansic: 12,085; perl: 528; sh: 363; makefile: 348; java: 144
file content (36 lines) | stat: -rwxr-xr-x 1,213 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
#! /usr/bin/make -f

%:
	dh $@ --no-parallel --with quilt

override_dh_auto_configure:
	dh_auto_configure -- \
	--with-inn-lib="/usr/lib/news $(shell dpkg-buildflags --get LDFLAGS)" \
	--with-multi-history
	

override_dh_auto_install:
	$(MAKE) prefix=$(CURDIR)/debian/suck/usr install

override_dh_fixperms:
	dh_fixperms
	chown -R news:news debian/suck/etc/suck debian/suck/var/spool/suck debian/suck/var/log/suck debian/suck/var/lib/suck
	chmod -R g+w debian/suck/etc/suck debian/suck/var/spool/suck debian/suck/var/log/suck debian/suck/var/lib/suck	
	chmod 0644 debian/suck/etc/suck/suckkillfile debian/suck/etc/suck/sucknewsrc debian/suck/etc/suck/get-news.conf
	chmod 0755 debian/suck/usr/lib/suck/put-news
	chmod -x debian/suck/usr/share/doc/suck/examples/*

override_dh_clean:
	dh_clean libcnews.a config.h.in configure

override_dh_installlogrotate:
	dh_installlogrotate

	# logroate 3.8+ requires an additional "su" command which is not
	# backportable, see #640493

	if dpkg --compare-versions `apt-cache show logrotate | grep ^Version | cut -f2- -d' '` ge 3.8; then \
	echo "Fixing logrotate configuration for logrotate >= 3.8..."; \
	sed -i '/^}/ i\	su news news' debian/suck/etc/logrotate.d/*; \
	fi