Commit dd9057c3 authored by Peter Pentchev's avatar Peter Pentchev
Browse files

Do not compile anything when building only architecture-independent packages.

Closes:		#917493
Reported by:	Santiago Vila <sanvila@debian.org>
parent 2891f2c6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ Uploaders:
 Peter Pentchev <roam@debian.org>
Build-Depends:
 debhelper-compat (= 12),
Build-Depends-Arch:
 libgif-dev,
 libmikmod-dev,
 libpng-dev,
+29 −4
Original line number Diff line number Diff line
@@ -14,6 +14,18 @@ export DEB_CFLAGS_MAINT_APPEND
DEB_LDFLAGS_MAINT_APPEND= -Wl,-z,defs
export DEB_LDFLAGS_MAINT_APPEND

ifneq (,$(filter fenix,$(shell dh_listpackages)))
BUILD_FENIX=yes
else
BUILD_FENIX=no
endif
ifneq (,$(filter fenix-dev,$(shell dh_listpackages)))
BUILD_FENIX_DEV=yes
else
BUILD_FENIX_DEV=no
endif

ifeq (${BUILD_FENIX},yes)
override_dh_auto_configure:
	chmod +x configure
	dh_auto_configure -- \
@@ -28,10 +40,6 @@ override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C debian/i18n

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) -C debian/i18n clean

override_dh_auto_install:
	dh_auto_install
	cd $(CURDIR)/debian/tmp/usr/bin/ && \
@@ -41,6 +49,17 @@ override_dh_auto_install:
	$(MAKE) -C debian/i18n install INSTALLPREFIX=$(CURDIR)/debian/tmp/usr/share/locale/
	cp debian/fenix.sh $(CURDIR)/debian/tmp/usr/bin/fenix
	chmod +x $(CURDIR)/debian/tmp/usr/bin/fenix
else
override_dh_auto_configure:

override_dh_auto_build:

override_dh_auto_install:
endif

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) -C debian/i18n clean

override_dh_installdocs:
	dh_installdocs --exclude=license.txt --exclude=authors.txt
@@ -48,5 +67,11 @@ override_dh_installdocs:
override_dh_installchangelogs:
	dh_installchangelogs -X ChangeLog

build-indep:
	dh $@ --without autoreconf

binary-indep:
	dh $@ --without autoreconf

%:
	dh $@