[DRE-commits] r6071 - trunk/coderay/debian

Jérémy Lal kapouer-guest at alioth.debian.org
Sun Feb 20 19:56:51 UTC 2011


Author: kapouer-guest
Date: 2011-02-20 19:56:49 +0000 (Sun, 20 Feb 2011)
New Revision: 6071

Modified:
   trunk/coderay/debian/rules
Log:
Install unmodified /usr/bin scripts, work around #571981

Modified: trunk/coderay/debian/rules
===================================================================
--- trunk/coderay/debian/rules	2011-02-20 19:56:39 UTC (rev 6070)
+++ trunk/coderay/debian/rules	2011-02-20 19:56:49 UTC (rev 6071)
@@ -1,30 +1,35 @@
 #!/usr/bin/make -f
 # CDBS file to build the Ruby CodeRay package.
-#
+
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/ruby-pkg-tools/1/class/ruby-setup-rb.mk
 
-PACKAGE = coderay
-SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
-SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
-TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
-.PHONY: get-orig-source
-get-orig-source:
-	rm -rf get-orig-source $(TARBALL)
-	mkdir get-orig-source
-	svn export -r $(SVN_REVISION) http://svn.rubychan.de/coderay/tags/$(SRC_VERSION) \
-	 get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
-	GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
-	rm -rf get-orig-source
-	echo "  "$(TARBALL)" created; move it to the right destination to build the package"
+# libsetup-ruby bug #571981 workaround
+post-patches::
+	cp $(CURDIR)/bin/coderay $(CURDIR)/debian/coderay.bak
+	cp $(CURDIR)/bin/coderay_stylesheet $(CURDIR)/debian/coderay_stylesheet.bak
 
+reverse-config::
+	if [ -f $(CURDIR)/debian/coderay.bak ]; then \
+		mv $(CURDIR)/debian/coderay.bak $(CURDIR)/bin/coderay; \
+	fi
+	if [ -f $(CURDIR)/debian/coderay_stylesheet.bak ]; then \
+		mv $(CURDIR)/debian/coderay_stylesheet.bak $(CURDIR)/bin/coderay_stylesheet; \
+	fi
+
+install/coderay::
+	cp $(CURDIR)/debian/coderay.bak $(CURDIR)/debian/coderay/usr/bin/coderay
+	cp $(CURDIR)/debian/coderay_stylesheet.bak $(CURDIR)/debian/coderay/usr/bin/coderay_stylesheet
+
+# end of the workaround
+
 install/libcoderay-ruby1.8::
-	mv $(CURDIR)/debian/libcoderay-ruby1.8/usr/bin/coderay* $(CURDIR)/debian/coderay/usr/bin/
+	rm $(CURDIR)/debian/libcoderay-ruby1.8/usr/bin/coderay*
 	rmdir $(CURDIR)/debian/libcoderay-ruby1.8/usr/bin
 	rm  $(CURDIR)/debian/libcoderay-ruby1.8/usr/lib/ruby/1.8/README
 
 install/libcoderay-ruby1.9.1::
-	mv $(CURDIR)/debian/libcoderay-ruby1.9.1/usr/bin/coderay* $(CURDIR)/debian/coderay/usr/bin/
+	rm $(CURDIR)/debian/libcoderay-ruby1.9.1/usr/bin/coderay*
 	rmdir $(CURDIR)/debian/libcoderay-ruby1.9.1/usr/bin
 	rm  $(CURDIR)/debian/libcoderay-ruby1.9.1/usr/lib/ruby/1.9.1/README
 




More information about the Pkg-ruby-extras-commits mailing list