File: rules

package info (click to toggle)
libsolv 0.6.24-1+deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,320 kB
  • ctags: 4,178
  • sloc: ansic: 58,528; python: 852; perl: 740; tcl: 728; ruby: 704; sh: 263; cpp: 204; makefile: 65
file content (93 lines) | stat: -rwxr-xr-x 3,781 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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

PKD   = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
UVER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
DTYPE =
VER  ?= $(subst $(DTYPE),,$(UVER))

NULL =

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

include /usr/share/cdbs/1/class/cmake.mk
include /usr/share/cdbs/1/class/python-module.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk

DEB_DH_INSTALL_ARGS += --fail-missing

DEB_DH_INSTALLCHANGELOGS_ARGS = NEWS

DEB_INSTALL_DOCS_ALL = README CREDITS BUGS

DEB_CMAKE_EXTRA_FLAGS := \
                         -DCMAKE_INSTALL_PREFIX=/usr \
                         -DLIB="lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)" \
                         -DINCLUDE="include/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)" \
                         -DUSE_VENDORDIRS=1 \
                         -DMULTI_SEMANTICS=1 \
                         -DDEBIAN=1 \
                         -DENABLE_PUBKEY=1 \
                         -DENABLE_SUSEREPO=1 \
                         -DENABLE_RPMMD=1 \
                         -DENABLE_RPMDB=1 \
                         -DENABLE_RPMDB_BYRPMHEADER=1 \
                         -DENABLE_HELIXREPO=1 \
                         -DENABLE_DEBIAN=1 \
                         -DENABLE_MDKREPO=1 \
                         -DENABLE_ARCHREPO=1 \
                         -DENABLE_CUDFREPO=1 \
                         -DCMAKE_VERBOSE_MAKEFILE=ON \
                         -DENABLE_LZMA_COMPRESSION=1 \
                         -DENABLE_BZIP2_COMPRESSION=1 \
                         -DENABLE_PERL=1 \
                         -DENABLE_PYTHON=1 \
                         -DENABLE_PYTHON3=1 \
                         -DCMAKE_SKIP_RPATH=FALSE \
                         -DCMAKE_SKIP_INSTALL_RPATH=TRUE \
                         $(NULL)

DEB_MAKE_CHECK_TARGET := test

common-install-indep:: remove-cruft tweak-install
common-install-arch:: remove-cruft tweak-install

remove-cruft::
	@echo "Nothing to decruft after installation."

tweak-install::
	if [ -e debian/tmp/usr/bin/repo2solv.sh ]; then mv debian/tmp/usr/bin/repo2solv.sh debian/tmp/usr/bin/repo2solv; fi

get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
	@

$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
	@echo "# Downloading..."
	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
	@echo "# Extracting..."
	mkdir $(PKG)-$(VER) \
	    && tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
	    || $(RM) -r $(PKG)-$(VER)
#       @echo "# Cleaning-up..."
#       cd $(PKG)-$(VER) \
#           && find . -depth -type d -name 'windows' -exec $(RM) -r {} \; -printf 'removed %p\n' \
#           && $(RM) -r -v \
#               docs/
	$(RM) -v $(PKG)_$(VER).orig.tar.*
	@echo "# Packing..."
	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
	    | XZ_OPT="-6v" tar -caf "../$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
	    && $(RM) -r "$(PKG)-$(VER)"