[go: up one dir, main page]

File: rules

package info (click to toggle)
comixcursors 0.9.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 932 kB
  • sloc: sh: 592; makefile: 150; python: 128
file content (128 lines) | stat: -rwxr-xr-x 3,339 bytes parent folder | download | duplicates (2)
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
116
117
118
119
120
121
122
123
124
125
126
127
128
#! /usr/bin/make -f

# debian/rules
# Part of Debian ‘comixcursors’ package.
#
# This is free software, and you are welcome to redistribute it under
# certain conditions; see the end of this file for copyright
# information, grant of license, and disclaimer of warranty.

PACKAGE_BUILDDIR = "$(CURDIR)/debian/build"
INSTALLDIR = "$(CURDIR)/debian/tmp"
ICONS_DIR = usr/share/icons
icons_builddir = "${PACKAGE_BUILDDIR}"/${ICONS_DIR}
icons_wrapdir = "${PACKAGE_BUILDDIR}"/etc/X11/cursors
icons_installdir = "${INSTALLDIR}"/${ICONS_DIR}
icons_destdir = "${DESTDIR}"/${ICONS_DIR}

GENERATED_FILES :=

package_mapping = debian/package-mapping
themeset_packages = $(shell cat ${package_mapping} | cut -d':' -f1)

per_package_files = dirs docs install preinst postinst prerm lintian-overrides

INSTALL = install
WRAP_THEMES = "$(CURDIR)"/debian/wrap-cursor-themes


.PHONY: build
build: build-indep build-arch
	dh $@

.PHONY: build-indep
build-indep: build-stamp
	dh $@

.PHONY: build-arch
build-arch: build-stamp
	dh $@

build-stamp: export DESTDIR="${PACKAGE_BUILDDIR}"
build-stamp:
	$(INSTALL) -d "${PACKAGE_BUILDDIR}"


.PHONY: clean
clean:
	$(RM) -r "${PACKAGE_BUILDDIR}"/*
	$(RM) ${GENERATED_FILES}
	dh $@


.PHONY: install
install: build $(foreach package,${themeset_packages},install-${package}-stamp)
	$(INSTALL) -d "${icons_wrapdir}"
	chmod +x ${WRAP_THEMES}
	PACKAGE_BUILDDIR="${PACKAGE_BUILDDIR}" $(WRAP_THEMES)

	dh $@

GENERATED_FILES += install-*-stamp
GENERATED_FILES += $(foreach suffix,${per_package_files}, \
	$(foreach package_name,$(shell cat ${package_mapping} | cut -d':' -f1), \
		debian/${package_name}.${suffix}))
install-%-stamp: themeset_prefix = $(shell cat ${package_mapping} | grep "^$*:" | cut -d':' -f2)
install-%-stamp:
	echo "* Generating files for package ‘$*’ (themeset prefix “${themeset_prefix}”)"
	for n in ${per_package_files} ; do \
		sed \
			-e "s:@THEMESET_PREFIX@:${themeset_prefix}:" \
			-e "s:@PACKAGE@:$*:" \
			debian/templates/$$n.template > debian/$*.$$n ; \
	done
	touch "$@"


.PHONY: binary-indep
binary-indep: build install
	dh $@

.PHONY: binary-arch
binary-arch: build install

.PHONY: binary
binary: build binary-indep binary-arch

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
#	Skip auto-detection of build tool.
	make clean


.PHONY: override_dh_auto_build
override_dh_auto_build:
#	Skip auto-detection of build tool.
	DESTDIR="${PACKAGE_BUILDDIR}" ./install-all
	rmdir "${icons_builddir}"/default

.PHONY: override_dh_auto_test
override_dh_auto_test:
#	Skip auto-detection of build tool.

.PHONY: override_dh_auto_install
override_dh_auto_install:
#	Skip auto-detection of build tool.
	$(INSTALL) -d "${INSTALLDIR}"
	cp -a "${PACKAGE_BUILDDIR}"/. "${INSTALLDIR}"/.

.PHONY: override_dh_installchangelogs
override_dh_installchangelogs:
	dh_installchangelogs NEWS


# Copyright © 2010–2018 Ben Finney <bignose@debian.org>
#
# This is free software; you may copy, modify and/or distribute this work
# under the terms of the GNU General Public License, version 3 or later.
# No warranty expressed or implied.
#
# On Debian systems, the complete text of version 3 of the GNU General
# Public License can be found in ‘/usr/share/common-licenses/GPL-3’.


# Local variables:
# mode: makefile
# coding: utf-8
# End:
# vim: filetype=make fileencoding=utf-8 :