Created
October 10, 2014 22:22
-
-
Save mshuler/fb9b2bf584683b391797 to your computer and use it in GitHub Desktop.
Ubuntu PPA deb build hack to include downloaded jars in Apache Cassandra source package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CREPO=~/git/cassandra | |
BRANCH=$1 | |
if [ "x$BRANCH" = "x" ]; then | |
echo "Gimme a branch/tag to build.." | |
exit 1 | |
fi | |
cd $CREPO | |
git reset --hard | |
git clean -xdf | |
git checkout $BRANCH | |
git pull | |
ant maven-ant-tasks-retrieve-build | |
mkdir -p debian/build.lib | |
mv build/maven-ant-tasks-*.jar debian/build.lib/ | |
mv build/lib/jars debian/build.lib/ | |
cat << 'EOF' > /tmp/ppahack.patch | |
diff --git a/debian/rules b/debian/rules | |
index 31fd0c0..025c0b1 100755 | |
--- a/debian/rules | |
+++ b/debian/rules | |
@@ -28,7 +28,12 @@ build-stamp: patch-stamp | |
dh_testdir | |
printf "version=%s" $(VERSION) > build.properties | |
- $(ANT) jar | |
+ mkdir -p build/lib | |
+ cp -p debian/build.lib/maven-ant-tasks-*.jar build/ | |
+ cp -a debian/build.lib/jars build/lib/ | |
+ | |
+ $(ANT) jar -Dwithout.maven=true | |
cd pylib && python setup.py install --no-compile --install-layout deb \ | |
--root $(CURDIR)/debian/cassandra | |
EOF | |
patch -p1 < /tmp/ppahack.patch | |
rm /tmp/ppahack.patch | |
DEBFULLNAME="Michael Shuler" DEBEMAIL="[email protected]" dch -i --distribution trusty | |
pdebuild --configfile ~/pbuilder/conf/pbuilderrc_sid-amd64.cow | |
debuild -S -sa | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment