[mate-sensors-applet] 04/12: debian/rules: Remove cdbs. Update to support mate-sesnors-applet-ati. Remove dfsg suffix.

Martin Wimpress flexiondotorg-guest at moszumanska.debian.org
Sun Aug 2 18:29:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

flexiondotorg-guest pushed a commit to branch debian/experimental
in repository mate-sensors-applet.

commit 0880833dea005466038953e6fbfd23b50cb10dac
Author: Martin Wimpress <code at flexion.org>
Date:   Sat Aug 1 22:58:29 2015 +0100

    debian/rules: Remove cdbs. Update to support mate-sesnors-applet-ati. Remove dfsg suffix.
---
 debian/rules | 85 +++++++++++++++++++++++++-----------------------------------
 1 file changed, 36 insertions(+), 49 deletions(-)

diff --git a/debian/rules b/debian/rules
index 27879f1..5673b7a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,51 +1,38 @@
 #!/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))
-
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/utils.mk
-include /usr/share/cdbs/1/class/autotools.mk
-
-DEB_BUILD_PARALLEL = 1
-
-DEB_DH_INSTALL_ARGS += --fail-missing
-
-DEB_CONFIGURE_SCRIPT := ./autogen.sh
-
-DEB_CONFIGURE_EXTRA_FLAGS += --disable-silent-rules \
-                             --with-nvidia=yes \
-                             --with-gtk=2.0
-
-common-install-indep:: remove-cruft
-common-install-arch:: remove-cruft
-
-remove-cruft::
-	rm -f debian/tmp/usr/lib/*.a
-	rm -f debian/tmp/usr/lib/*.la
-	rm -f debian/tmp/usr/lib/mate-sensors-applet/plugins/*.a
-	rm -f debian/tmp/usr/lib/mate-sensors-applet/plugins/*.la
-
-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/
-	$(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)"
+# add appropriate flags for Debian
+DEB_CONFIGURE_EXTRA_FLAGS =
+ifeq ($(shell dpkg-vendor --is Debian && echo yes),yes)
+	DEB_CONFIGURE_EXTRA_FLAGS += --with-aticonfig=yes
+endif
+# add appropriate flags for Ubuntu
+ifeq ($(shell dpkg-vendor --is Ubuntu && echo yes),yes)
+	DEB_CONFIGURE_EXTRA_FLAGS += --with-aticonfig=/usr/lib/fglrx/bin/aticonfig
+endif
+
+DHFLAGS=--parallel
+
+%:
+	dh $@ $(DHFLAGS)
+
+override_dh_install:
+	rm -rfv debian/tmp/usr/lib/*/*.a
+	rm -rfv debian/tmp/usr/lib/*/*.la
+	rm -rfv debian/tmp/usr/lib/*/mate-sensors-applet/plugins/*.a
+	rm -rfv debian/tmp/usr/lib/*/mate-sensors-applet/plugins/*.la
+	dh_install --fail-missing
+
+override_dh_auto_configure:
+	NOCONFIGURE=1 ./autogen.sh
+	dh_auto_configure $(DHFLAGS) -- \
+		--libexecdir=/usr/lib/mate-sensors-applet \
+		$(DEB_CONFIGURE_EXTRA_FLAGS) \
+		--with-nvidia=yes \
+		--with-gtk=2.0
+
+override_dh_strip:
+	dh_strip -pmate-sensors-applet --dbg-package=mate-sensors-applet-dbg
+	dh_strip -plibmate-sensors-applet-plugin0 --dbg-package=libmate-sensors-applet-plugin0-dbg
+
+get-orig-source:
+	uscan --noconf --force-download --rename --download-current-version --destdir=..

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-sensors-applet.git



More information about the pkg-mate-commits mailing list