xz-utils: NEWS: emphasize that interleaved output is unusual
[xz/debian.git] / debian / rules
blobfed5d1d2cac05aef7d64ad317676c0853ff8dd2e
1 #!/usr/bin/make -f
3 build clean install binary-arch binary-indep binary:
4 +dh --parallel $(opt_no_act) $@
6 override_dh_auto_clean:
7 dh_auto_clean --builddirectory debian/xzdec-build
8 dh_auto_clean --builddirectory debian/normal-build
9 sh debian/clean.sh
11 override_dh_auto_configure:
12 autoreconf -fis
13 dh_auto_configure --builddirectory debian/normal-build -- \
14 $(opt_optimize) $(opt_quiet)
15 dh_auto_configure --builddirectory debian/xzdec-build -- \
16 --disable-shared --disable-nls --disable-encoders \
17 --enable-small --disable-threads \
18 $(opt_optimize_small) $(opt_quiet)
20 override_dh_auto_build:
21 dh_auto_build --builddirectory debian/normal-build
22 cd debian/normal-build && doxygen Doxyfile
23 $(MAKE) -C debian/xzdec-build/src/liblzma
24 $(MAKE) -C debian/xzdec-build/src/xzdec
26 override_dh_auto_test:
27 $(MAKE) -C debian/normal-build check
29 override_dh_auto_install:
30 dh_auto_install --builddirectory debian/normal-build
31 $(MAKE) -C debian/xzdec-build/src/xzdec install \
32 DESTDIR=$$(pwd)/debian/tmp
34 override_dh_installchangelogs:
35 dh_installchangelogs debian/changelog.upstream
37 opt_optimize = CFLAGS="-g -O2"
38 opt_optimize_small = CFLAGS="-g -Os"
39 opt_no_act =
40 opt_quiet =
42 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
43 opt_optimize = --disable-assembler CFLAGS="-g -O0"
44 opt_optimize_small = --disable-assembler CFLAGS="-g -O0"
45 endif
47 ifneq (,$(findstring n,$(MAKEFLAGS)))
48 opt_no_act = --no-act
49 endif
51 ifneq (,$(filter quiet,$(DEB_BUILD_OPTIONS)))
52 opt_quiet = --quiet
53 MAKEFLAGS += --quiet
54 endif
56 # Build a tarball with the latest upstream version.
57 # This is made complicated by the need to choose a nice version number.
58 REPO = git://ctrl.tukaani.org/xz.git
59 BRANCH = master
60 get-orig-source:
61 mkdir debian-orig-source
62 -set -e; cd debian-orig-source; \
63 : fetch latest upstream version; \
64 git init -q; \
65 git fetch -q --tags $(REPO); \
66 git fetch -q $(REPO) $(BRANCH); \
67 : determine upstream version number; \
68 commit_name=$$(git describe FETCH_HEAD); \
69 release=$${commit_name%%-*}; \
70 date=$$(date --utc --date="$$( \
71 git log -1 --pretty=format:%cD "$$commit_name" \
72 )" "+%Y%m%d"); \
73 if test "$$commit_name" = "$$release"; \
74 then upstream_version=$${commit_name#v}; \
75 else upstream_version="$${release#v}+$${date}"; \
76 fi; \
77 : generate tarball; \
78 echo "packaging $$commit_name"; \
79 git archive --format=tar "$$commit_name" \
80 --prefix="xz-utils-$$upstream_version/" | \
81 gzip -9 > "../xz-utils_$$upstream_version.orig.tar.gz"
82 rm -fr debian-orig-source