diff options
author | James Cowgill <james410@cowgill.org.uk> | 2013-08-23 10:26:18 +0100 |
---|---|---|
committer | James Cowgill <james410@cowgill.org.uk> | 2013-08-23 10:26:18 +0100 |
commit | 561f2eed265d7244f911904c78e4382538713111 (patch) | |
tree | 8746115c0a8715f5e50ae3f168a43dc61597d5ec /debian/rules | |
parent | eb8a9d2cad30fd842ff5b2541b62f999a8490c51 (diff) |
Lots of repackaging for sfml 2.1
This is in one commit since I havn't been using git to do most of this.
From the changelog of things done so far:
* New upstream version 2.1 (Closes: #706001)
* Add dependency to libgl-dev and libglu-dev to libsfml-dev (Closes: #706239)
* Modify debian/copyright to use the machine-readable format
(http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/)
* Added doc-base file for API documentation
* Moved debian/watch source to the SFML github repository
* Upgrade source format to 3.0 and debhelper 9 using dh
* Upgrade to standards version 3.9.4
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 111 |
1 files changed, 38 insertions, 73 deletions
diff --git a/debian/rules b/debian/rules index aa47356..0598f9d 100755 --- a/debian/rules +++ b/debian/rules @@ -1,79 +1,44 @@ #!/usr/bin/make -f # -*- makefile -*- -# Sample debian/rules that uses debhelper. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -version=1.6 -major=1 - -include /usr/share/quilt/quilt.make -include $(wildcard /usr/share/topgit/tg2quilt.mk) - -get-orig-source: - cd .. ; rm -rf libsfml-$(version).orig ; mkdir libsfml-$(version).orig ; cd libsfml-$(version).orig ; \ - wget http://downloads.sourceforge.net/sfml/SFML-$(version)-sdk-linux-32.tar.gz ; \ - tar -xzf SFML-$(version)-sdk-linux-32.tar.gz ; cd SFML-$(version) ; \ - find . \( -iname glew -o -iname glext -o -iname libjpeg \ - -o -iname libpng -o -iname zlib -o -iname SOIL \) -print | xargs /bin/rm -rf ; \ - find samples \( -name "*.jpg" -o -name "*.png" -o -name "*.[ch]pp" -o \ - -name "*.sfx" \) -print | xargs /bin/chmod a-x ; \ - rm -rf samples/bin/datas/ ;\ - make mrproper ; \ - cd .. ; rm SFML-$(version)-sdk-linux-32.tar.gz; mv SFML-$(version)/* . ; rm -r SFML-$(version) - cd .. ; GZIP="--best" tar -czf libsfml-$(version)+dfsg1.orig.tar.gz libsfml-$(version).orig - -build: build-stamp -build-stamp: $(QUILT_STAMPFN) - dh_testdir - mkdir -p lib - $(MAKE) sfml - touch $@ - -clean: unpatch - dh_testdir - dh_testroot - -# Add here commands to clean up after the build process. - $(MAKE) mrproper - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - $(MAKE) DESTDIR=$(CURDIR)/debian/tmp/usr install - find $(CURDIR)/debian/tmp -name Win32 -o -name OSX -print | xargs /bin/rm -rf - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples - dh_install --fail-missing --sourcedir=debian/tmp - dh_installman - dh_link - dh_strip --dbg-package=libsfml$(version)-dbg - dh_lintian - 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 +PKD = $(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 = +dfsg +VER ?= $(subst $(DTYPE),,$(UVER)) + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- -DSFML_BUILD_DOC=ON + +override_dh_strip: + dh_strip --dbg-package=libsfml2-dbg + +## http://wiki.debian.org/onlyjob/get-orig-source +.PHONY: get-orig-source +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 \ + extlibs/ \ + examples/*/resources/ + #$(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)" |