diff options
author | Agustin Henze <tin@sluc.org.ar> | 2013-11-18 19:41:20 -0300 |
---|---|---|
committer | Agustin Henze <tin@sluc.org.ar> | 2013-11-18 19:41:20 -0300 |
commit | f800457599dc6b10fe32932f48b71a9068d4318a (patch) | |
tree | 9f8218193eb9c620258dee45903a14dc9670d4ec | |
parent | 33c50017a5af3e4e09727ddf56eab02ebaf2f1b7 (diff) | |
download | nikola-f800457599dc6b10fe32932f48b71a9068d4318a.tar.bz2 nikola-f800457599dc6b10fe32932f48b71a9068d4318a.tar.xz nikola-f800457599dc6b10fe32932f48b71a9068d4318a.tar.zst |
Add get-orig-source target
-rwxr-xr-x | debian/rules | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/debian/rules b/debian/rules index e909b30..0b8735c 100755 --- a/debian/rules +++ b/debian/rules @@ -4,6 +4,8 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +UVERSION := $(shell dpkg-parsechangelog | sed -n -e's/^Version: \(.*\)-[^-]\+/\1/p' | cut -d ":" -f 2) +PACKAGE_NAME := $(shell dpkg-parsechangelog | sed -n -e's/^Source: \(.*\)\+/\1/p') PYVERS := python2.7 %: @@ -15,7 +17,6 @@ override_dh_auto_clean: dh_auto_clean -- --all rm -rf build rm -rf Nikola.egg-info - rm -f debian/nikola.1 override_dh_auto_install: set -ex; \ @@ -28,17 +29,25 @@ override_dh_auto_install: rst2html docs/theming.txt debian/nikola/usr/share/doc/nikola/theming.html rst2html docs/creating-a-theme.txt debian/nikola/usr/share/doc/nikola/creating-a-theme.html rst2html docs/extending.txt debian/nikola/usr/share/doc/nikola/extending.html - # Manpage - rst2man docs/man/nikola.1 debian/nikola.1 # Drop wrong permission find debian/nikola/usr/lib -perm /a+x -type f -exec chmod -x {} + # Remove a copy of mit license find debian/nikola/usr/lib -name "MIT-LICENSE.txt" -type f -exec rm {} + -override_dh_link: - # Remove embedded code from other software pieces - # Bootstrap, provided by libjs-twitter-bootstrap on runtime-dep - rm debian/nikola/usr/share/pyshared/nikola/data/themes/default/assets/js/bootstrap.js - rm debian/nikola/usr/share/pyshared/nikola/data/themes/default/assets/css/bootstrap-responsive.css - rm debian/nikola/usr/share/pyshared/nikola/data/themes/default/assets/css/bootstrap.css - dh_link +get-orig-source: + @if [ ! -d "debian" ] ; then \ + echo 'Run this from the top directory of the Debian source' >&2; \ + exit 1; \ + fi + mkdir -p ../tmp/nikola_$(UVERSION) + wget https://github.com/getnikola/nikola/archive/v$(UVERSION).tar.gz \ + -O ../tmp/nikola_$(UVERSION).tar.gz; + tar xf ../tmp/nikola_$(UVERSION).tar.gz \ + -C ../tmp/nikola_$(UVERSION) \ + '--exclude=*min.*' \ + '--exclude=*bootstrap3*' \ + '--exclude=*bootstrap.js' \ + '--exclude=*bootstrap.css' \ + '--exclude=*bootstrap-responsive.css' \ + '--exclude=*glyphicons-halflings*.png'; + tar -C ../tmp/nikola_$(UVERSION) nikola-$(UVERSION) -c --xz -f ../nikola_$(UVERSION).orig.tar.xz |