File: rules

package info (click to toggle)
wmweather 2.4.3-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 492 kB
  • ctags: 114
  • sloc: ansic: 1,543; sh: 188; makefile: 90
file content (68 lines) | stat: -rwxr-xr-x 2,275 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
#!/usr/bin/make -f

testdir  = test -f src/wmweather.c && test -f debian/rules
testroot = test x`whoami` = xroot

# FOR AUTOCONF 2.52 AND NEWER ONLY
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
	CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
else
	CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
export CFLAGS

clean:
	$(testdir)
	rm -f build debian/files debian/substvars
	-$(MAKE) -C src -i distclean
	rm -rf debian/wmweather

build:
	$(testdir)
	cd src && ./configure $(CONFFLAGS) --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --with-xmessage=/usr/X11R6/bin/xmessage
	$(MAKE) -C src
	touch build

binary: binary-arch

binary-indep:

binary-arch: build
	$(testdir)
	$(testroot)
	rm -rf debian/wmweather

	$(MAKE) -C src install DESTDIR=$(CURDIR)/debian/wmweather
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	strip -R .comment -R .note debian/wmweather/usr/bin/wmweather
endif
	gzip -9n debian/wmweather/usr/share/man/man1/wmweather.1
	rm -f debian/wmweather/usr/share/man/man1/wmWeather.1
	ln -s wmweather.1.gz debian/wmweather/usr/share/man/man1/wmWeather.1.gz
	install -D -m 0644 debian/wmweather.conf debian/wmweather/etc/wmweather.conf
	install -D -m 0755 debian/ip-up debian/wmweather/etc/ppp/ip-up.d/wmweather
	install -D -m 0644 debian/menu  debian/wmweather/usr/share/menu/wmweather

	install -D -m 0644 CHANGES debian/wmweather/usr/share/doc/wmweather/changelog
	install -D -m 0644 debian/changelog debian/wmweather/usr/share/doc/wmweather/changelog.Debian
	install    -m 0644 README debian/copyright debian/wmweather/usr/share/doc/wmweather
	gzip -9n debian/wmweather/usr/share/doc/wmweather/changelog*

	install -d -m 0755 debian/wmweather/DEBIAN
	install    -m 0644 debian/control debian/conffiles debian/wmweather/DEBIAN
	install    -m 0755 debian/postinst debian/postrm debian/wmweather/DEBIAN
	cd debian/wmweather && find usr -type f -print0 | xargs -0 md5sum > DEBIAN/md5sums

	dpkg-shlibdeps debian/wmweather/usr/bin/wmweather
	dpkg-gencontrol -isp -pwmweather -Pdebian/wmweather
	chmod -R u+w,go=u-w debian/wmweather
	dpkg --build debian/wmweather ..

.PHONY: clean binary binary-indep binary-arch