File: rules

package info (click to toggle)
slrn 0.9.8.1pl1-28
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,236 kB
  • ctags: 3,292
  • sloc: ansic: 38,429; sh: 5,783; perl: 465; makefile: 264; sed: 16
file content (115 lines) | stat: -rwxr-xr-x 3,894 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/usr/bin/make -f

SYS := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) 
ifeq ($(SYS), gnu )
	WITH_UUDEV := --without-uudeview
else
	WITH_UUDEV := --with-uudeview
endif

include /usr/share/dpatch/dpatch.make

build: build-stamp
build-stamp: patch
	dh_testdir
	autoconf
	./configure --with-libdir=/var/lib/slrn \
		--with-slrnpull \
		--with-gnutls \
		--enable-inews --enable-spool \
		--enable-setgid-code \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc/news \
		--with-server-file=/etc/news/server \
		--with-canlock \
		--enable-iconv \
		$(WITH_UUDEV) 

	$(MAKE)
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-$(MAKE) -i distclean
	dh_clean po/*.gmo src/stamp-h.in configure
	-test -r /usr/share/misc/config.sub && cp -f /usr/share/misc/config.sub autoconf/config.sub
	-test -r /usr/share/misc/config.guess && cp -f /usr/share/misc/config.guess autoconf/config.guess

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs usr/sbin var/lib/slrn etc/news etc/ppp/ip-up.d
	dh_installdirs -pslrnpull usr/share/doc usr/bin usr/share/man/man1 \
		etc/news etc/ppp/ip-up.d var/log/news var/spool/slrnpull/data \
		var/spool/slrnpull/news var/spool/slrnpull/out.going/rejects
	$(MAKE) install prefix=`pwd`/debian/slrn/usr \
		mandir=`pwd`/debian/slrn/usr/share/man
	$(MAKE) install-contrib prefix=`pwd`/debian/slrn/usr
	# The following arn't relevant to the debian package, or are
	# installed differently.
	rm -f debian/slrn/usr/share/doc/slrn/COPY* \
		debian/slrn/usr/share/doc/slrn/README.GroupLens \
		debian/slrn/usr/share/doc/slrn/changes.txt \
		debian/slrn/usr/share/doc/slrn/help.txt \
		debian/slrn/usr/share/doc/slrn/score.sl \
		debian/slrn/usr/share/doc/slrn/slrn.rc \
		debian/slrn/usr/share/doc/slrn/slrnpull/score \
		debian/slrn/usr/share/doc/slrn/slrnpull/slrn.rc \
		debian/slrn/usr/share/doc/slrn/slrnpull/slrnpull.conf \
		debian/slrn/usr/share/doc/slrn/slrnpull/slrnpull.sh
	# And a few things move over to slrnpull.
	mv -f debian/slrn/usr/share/doc/slrn/slrnpull \
		debian/slrnpull/usr/share/doc
	mv -f debian/slrn/usr/bin/slrnpull debian/slrnpull/usr/bin
	mv -f debian/slrn/usr/share/man/man1/slrnpull.1 \
		debian/slrnpull/usr/share/man/man1
	chmod +x debian/slrn/usr/share/slrn/contrib/*
	# A few more things to install:
	install -m 644 doc/help.txt debian/slrn/etc/news/slrn-help.txt
	install -m 644 debian/slrn.rc debian/slrn/etc/news/slrn.rc
	install debian/slrn_getdescs debian/slrn/usr/sbin
	install debian/ip-up debian/slrn/etc/ppp/ip-up.d/slrn
	install debian/slrnpull.ip-up debian/slrnpull/etc/ppp/ip-up.d/slrnpull
	install -m 644 doc/slrnpull/slrnpull.conf debian/slrnpull/etc/news
	dh_install debian/slrn-icon.xpm usr/share/pixmaps
	
# Build architecture-dependent files here.
binary-arch: build install
	dh_installdebconf
	dh_installdocs
	dh_installexamples doc/slrn.rc doc/score.sl
	dh_installmenu
	dh_installcron
	dh_installlogrotate
	dh_installman debian/slrn_getdescs.8
	dh_installchangelogs -k changes.txt
	dh_strip
	dh_compress
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_fixperms
	chown news:news debian/slrn/etc/news debian/slrn/var/lib/slrn
	chown -R news:news debian/slrnpull/var/spool/slrnpull
	chmod g+s debian/slrnpull/var/spool/slrnpull
	# The perms on these directories are set so that files in them
	# are owned by group news, but the directories are only writable
	# by user news. out.going is g+w,+t since users write there.
	chown -R news:news debian/slrnpull/var/spool/slrnpull/*
	chmod -R g+s debian/slrnpull/var/spool/slrnpull/*
	chmod g+w,+t debian/slrnpull/var/spool/slrnpull/out.going
	
	dh_link -pslrnpull etc/news/slrnpull.conf var/spool/slrnpull/slrnpull.conf

	dh_md5sums
	dh_builddeb

# Build architecture-independent files here.
binary-indep: build

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install unpatch