summaryrefslogtreecommitdiff
path: root/p/uuagc
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2013-02-09 16:12:36 +0400
committerJoachim Breitner <mail@joachim-breitner.de>2013-02-09 16:12:36 +0400
commit32f70794daca30f9e59ecbe26d34984ede8cb253 (patch)
tree73eb1e8a00bfd05f29cdb568a3644c1f7a679bdc /p/uuagc
parentb16df0c832acec2f8ed8449b302744ec890b0a39 (diff)
downloadDHG_packages-32f70794daca30f9e59ecbe26d34984ede8cb253.tar.gz
uuagc: uuagc can now bootstrap itself, drop patches
Diffstat (limited to 'p/uuagc')
-rwxr-xr-xp/uuagc/debian/rules29
1 files changed, 29 insertions, 0 deletions
diff --git a/p/uuagc/debian/rules b/p/uuagc/debian/rules
index ea85348cf..d081b0dbf 100755
--- a/p/uuagc/debian/rules
+++ b/p/uuagc/debian/rules
@@ -3,6 +3,35 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk
+# UUAGC is a self-bootstrapping program. Upstream ships the generated files in
+# a separate package, uuagc-boostrap. To avoid this in debian, we keep the
+# generated files in debian/generated-files. At build time, these are copied
+# to the expected location.
+#
+# To update these, make sure a usable uuagc is on the path and run
+# fakeroot debian/rules update-generated-files.
+
+build/uuagc:: dist-ghc/build/uuagc/uuagc-tmp build-ghc-stamp
+
+dist-ghc/build/uuagc/uuagc-tmp:
+ mkdir dist-ghc/build/uuagc/uuagc-tmp/ -p
+ cp -v debian/generated-files-uuagc/*.hs dist-ghc/build/uuagc/uuagc-tmp/
+ cp -v debian/generated-files/*.hs dist-ghc/build/
+ touch dist-ghc/build/uuagc/uuagc-tmp/*
+
+clean::
+ rm -f debian/bootstrapping
+
+debian/bootstrapping:
+ touch $@
+
+update-generated-files:: clean debian/bootstrapping build-ghc-stamp
+ rm -f debian/generated-files/*.hs
+ rm -f debian/generated-files-uuagc/*.hs
+ cp -v dist-ghc/build/*.hs debian/generated-files/
+ cp -v dist-ghc/build/uuagc/uuagc-tmp/*.hs debian/generated-files-uuagc/
+
+
# UUAGC has a strange way of setting the flag: It has to be set via a cpp
# defines when compiling Setup
$(DEB_SETUP_BIN_NAME):