File rules of Package libgdiplus

#!/usr/bin/make -f

#export DH_VERBOSE=1
MAKEFILE = $(firstword $(MAKEFILE_LIST))
DEBIAN_DIR = $(dir $(MAKEFILE))
SOURCE_DIR = $(DEBIAN_DIR)/..

DEB_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Version | cut -d" " -f2)
DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2)
VERSION = $(shell echo $(DEB_VERSION) | cut -d"-" -f1 | sed 's/+dfsg.*//')


DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

include /usr/share/dpatch/dpatch.make

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

get-orig-source:
	[ -d ../tarballs ] || mkdir ../tarballs
	uscan \
		--package $(DEB_SOURCE_NAME) \
		--watchfile $(DEBIAN_DIR)/watch \
		--upstream-version $(VERSION) \
		--download-version $(VERSION) \
		--destdir ../tarballs \
		--force-download \
		--rename
	bzcat ../tarballs/$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.bz2 | \
		gzip -9fn -c - > ../tarballs/$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.gz
	rm ../tarballs/$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.bz2


configstatus: patch-stamp configure
	dh_testdir
	CFLAGS="$(CFLAGS)" ./configure \
	  --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
	  --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
	  --with-cairo=system
	perl -pe 's/-Werror//' -i src/Makefile

build: build-stamp
build-stamp: configstatus
	dh_testdir
	$(MAKE)
	perl -pe 's,^Requires:.*,,; s,^Libs:.*,,; s,^Cflags:.*,,;' -i libgdiplus.pc
	touch build-stamp

clean: clean-patched unpatch
clean-patched:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) clean
	rm -f config.status config.log
	rm -f cairo/config.status cairo/config.log
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
	dh_installexamples
	dh_install
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install 
openSUSE Build Service is sponsored by