Skip to content

Commit

Permalink
[debian] Update d/rules and switch to non-native package
Browse files Browse the repository at this point in the history
- Cleaned debian/rules by using python2 and sphinxdoc
- Added debian/watch file
- Override get-orig-source (remove .git and debian dir. from .orig tgz)

https://wiki.debian.org/DebianMentorsFaq#What_is_the_difference_between_a_native_Debian_package_and_a_non-native_package.3F
https://wiki.debian.org/DebianMentorsFaq#What.27s_wrong_with_upstream_shipping_a_debian.2F_directory.3F
  • Loading branch information
sbadia committed Apr 11, 2014
1 parent d0d9677 commit e278929
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
2 changes: 0 additions & 2 deletions debian/pycassa-doc.links

This file was deleted.

26 changes: 16 additions & 10 deletions debian/rules
@@ -1,18 +1,12 @@
#!/usr/bin/make -f

%:
dh $@
dh $@ --with python2,sphinxdoc

override_dh_auto_build:
dh_auto_build
python setup.py doc

override_dh_install:
dh_install
rm debian/pycassa-doc/usr/share/doc/pycassa-doc/manual/_static/jquery.js
rm debian/pycassa-doc/usr/share/doc/pycassa-doc/manual/_static/underscore.js
ln -s /usr/share/javascript/jquery/jquery.js debian/pycassa-doc/usr/share/doc/pycassa-doc/manual/_static/

override_dh_auto_install:
dh_auto_install -ppython-pycassa --destdir=debian/python-pycassa

Expand All @@ -22,6 +16,18 @@ override_dh_installchangelogs:
override_dh_compress:
dh_compress -X pycassa-doc/manual

override_dh_clean:
dh_clean
$(RM) -r doc/_build
PACKAGE = pycassa
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
get-orig-source:
rm -rf get-orig-source $(TARBALL)
mkdir get-orig-source
git clone git://github.com/$(PACKAGE)/$(PACKAGE).git get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
cd get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig ; git reset --hard v$(SRC_VERSION)
rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/.git
rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/debian
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"

.PHONY: get-orig-source
2 changes: 1 addition & 1 deletion debian/source/format
@@ -1 +1 @@
1.0
3.0 (quilt)
2 changes: 0 additions & 2 deletions debian/source/local-options

This file was deleted.

3 changes: 3 additions & 0 deletions debian/watch
@@ -0,0 +1,3 @@
version=3
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/pycassa-$1\.tar\.gz/ \
https://github.com/pycassa/pycassa/tags .*/v?(\d\S*)\.tar\.gz

0 comments on commit e278929

Please sign in to comment.