Browse Source

debian/rules: Update for new upstream release. Remove dfsg suffix.

tags/debian/1.10.2+gfdl1-1
Martin Wimpress 6 years ago
parent
commit
5b477afa0e
1 changed files with 23 additions and 48 deletions
  1. +23
    -48
      debian/rules

+ 23
- 48
debian/rules View File

@@ -1,53 +1,28 @@
#!/usr/bin/make -f

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 = +dfsg1
VER ?= $(subst $(DTYPE),,$(UVER))
DHFLAGS=--parallel

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
%:
dh $@ $(DHFLAGS)

DEB_BUILD_PARALLEL = 1

DEB_DH_INSTALL_ARGS += --fail-missing

# use the NEWS file as upstream ChangeLog...
DEB_DH_INSTALLCHANGELOGS_ARGS = NEWS
DEB_INSTALL_DOCS_ALL = README AUTHORS

DEB_CONFIGURE_EXTRA_FLAGS += --disable-silent-rules \
--libexecdir=/usr/lib/mate-utils

DEB_CONFIGURE_SCRIPT := ./autogen.sh

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

remove-cruft::
rm -fv debian/tmp/usr/lib/*.la
override_dh_install:
rm -rfv debian/tmp/usr/lib/*/*.a
rm -rfv debian/tmp/usr/lib/*/*.la
rm -fv debian/tmp/usr/share/MateConf/gsettings/*.convert

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) \
&& $(RM) -r -v \
*/help/ \
COPYING.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)"
dh_install --fail-missing

override_dh_auto_configure:
NOCONFIGURE=1 ./autogen.sh
dh_auto_configure $(DHFLAGS) -- \
--libexecdir=/usr/lib/mate-utils \
--enable-deprecated \
--disable-static \
--disable-maintainer-flags \
--with-gtk=2.0

override_dh_strip:
dh_strip -pmate-utils --dbg-package=mate-utils-dbg
dh_strip -plibmatedict6 --dbg-package=libmatedict6-dbg

get-orig-source:
uscan --noconf --force-download --rename --download-current-version --destdir=..

Loading…
Cancel
Save