File: rules

package info (click to toggle)
linuxlogo 6.0-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 1,052 kB
  • sloc: ansic: 4,461; sh: 380; makefile: 291; perl: 7
file content (42 lines) | stat: -rwxr-xr-x 1,424 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/vendor.mk
export CROSS=$(DEB_HOST_GNU_TYPE)-
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export DESTDIR=$(CURDIR)/debian/linuxlogo
export PREFIX=/usr

%:
	dh $@

logo_config:
	find ./logos -type f | LC_ALL=C sort > $@

# Note: NO DEPENDENCY on po/linux_logo.pot. This stanza creates a
# backup, because the original gets modified during the build process,
# so it needs to be restored while cleaning post-build. (The file
# is automatically generated, so it would be even better to just not
# have it in the upstream tarball.)
po/linux_logo.pot.BAK:
	[ ! -f $@ ] && cp --verbose po/linux_logo.pot $@

override_dh_auto_configure: logo_config po/linux_logo.pot.BAK
	./configure

debian/local/linux_logo.conf:
	d=$(dir $@);						\
	for v in $(DEB_VENDOR) $(DEB_PARENT_VENDOR) Debian; do	\
	  if [ -r $${d}linux_logo.$${v}.conf ]; then		\
	    cp -p --verbose $${d}linux_logo.$${v}.conf $@;	\
	    break;						\
	  fi							\
	done

execute_before_dh_install: debian/local/linux_logo.conf

override_dh_auto_clean:
	[ ! -f po/linux_logo.pot.BAK ] || cp --verbose po/linux_logo.pot.BAK po/linux_logo.pot
	-cmp --quiet po/linux_logo.pot.BAK po/linux_logo.pot && rm --verbose -f po/linux_logo.pot.BAK
	[ ! -f Makefile ] || ./configure && make distclean