File: rules

package info (click to toggle)
xloadimage 4.1-24
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,772 kB
  • ctags: 6,081
  • sloc: ansic: 36,084; asm: 284; makefile: 282; sh: 280
file content (58 lines) | stat: -rwxr-xr-x 1,741 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f

install_dir=install -d -m 755
install_file=install -m 644
install_script=install -m 755
install_binary=install -m 755

PACKAGE = xloadimage
PKGDIR	= $(CURDIR)/debian/$(PACKAGE)

export DEB_BUILD_MAINT_OPTIONS	= hardening=+all
export DEB_CFLAGS_MAINT_APPEND	= -Wall -DLINT
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

CHANGELOG = debian/upstream.changelog

get-changelog:
	# extract details
	awk '/^[Vv]ersion *[0-9]/,/end-of-file/ {print}' README > $(CHANGELOG)

override_dh_installchangelogs: get-changelog
	dh_installchangelogs $(CHANGELOG)

override_dh_auto_configure:
	chmod 755 build-info configure
	# uufilter does not respect LDFLAGS, so send all flags in CFLAGS
	CFLAGS="$(CFLAGS) $(CPPFLAGS) $(LDFLAGS)" \
	./configure --prefix=/usr

override_dh_clean:
	rm -f build *.o xloadimage uufilter build.c config.log config.cache \
	       config.status config.h Makefile jpeg.conf tiff.conf
	rm -rf debian/tmp debian/files* debian/substvars debian/patched
	find . -name \*~ | xargs rm -vf
	dh_clean

override_dh_auto_install:
	$(install_binary) xloadimage $(PKGDIR)/usr/bin/
	ln -s xloadimage $(PKGDIR)/usr/bin/xsetbg
	ln -s xloadimage $(PKGDIR)/usr/bin/xview
	$(install_binary) uufilter $(PKGDIR)/usr/bin/

	$(install_file) xloadimagerc $(PKGDIR)/etc/X11/Xloadimage

	$(install_file) debian/mime $(PKGDIR)/usr/lib/mime/packages/xloadimage

	$(install_dir) $(PKGDIR)/usr/share/man/man1/
	$(install_file) xloadimage.man $(PKGDIR)/usr/share/man/man1/xloadimage.1x
	$(install_file) uufilter.man $(PKGDIR)/usr/share/man/man1/uufilter.1x
	ln -s xloadimage.1x.gz $(PKGDIR)/usr/share/man/man1/xsetbg.1x.gz
	ln -s xloadimage.1x.gz $(PKGDIR)/usr/share/man/man1/xview.1x.gz

%:
	dh $@

.PHONY: get-changelog

# End of file