rules 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/make -f
  2. PACKAGE=u3-tool
  3. VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
  4. TARBALL=$(PACKAGE)_$(VERSION).orig.tar.gz
  5. SVN_ROOT=http://u3-tool.svn.sourceforge.net/svnroot/u3-tool/trunk/
  6. SVN_REV=$(shell echo $(VERSION) | sed 's/.*svn//' )
  7. build: build-stamp
  8. build-stamp:
  9. dh build --before build
  10. $(MAKE) -C src
  11. dh build --after build
  12. touch $@
  13. clean:
  14. dh clean
  15. $(MAKE) -C src clean
  16. install: build
  17. dh install --before dh_installman
  18. install -D -m 0644 $(CURDIR)/doc/u3-tool.1 \
  19. $(CURDIR)/debian/u3-tool/usr/share/man/man1/u3_tool.1
  20. dh install --remaining
  21. binary-indep: install
  22. dh binary-indep
  23. binary-arch: install
  24. dh binary-arch
  25. binary: binary-indep binary-arch
  26. dh binary
  27. get-orig-source:
  28. @echo "Fetching $(PACKAGE) from $(SVN_ROOT) at revision $(SVN_REV)."
  29. rm -rf get-orig-source $(TARBALL)
  30. mkdir get-orig-source
  31. svn co $(SVN_ROOT) get-orig-source/upstream
  32. svn export -r $(SVN_REV) get-orig-source/upstream \
  33. get-orig-source/$(PACKAGE)-$(VERSION).orig
  34. GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(VERSION).orig
  35. rm -rf get-orig-source
  36. @echo "Generated $(TARBALL)."
  37. .PHONY: build clean binary-indep binary-arch binary install get-orig-source