diff options
Diffstat (limited to 'app-mobilephone/bitpim/files/maketarball')
-rwxr-xr-x | app-mobilephone/bitpim/files/maketarball | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app-mobilephone/bitpim/files/maketarball b/app-mobilephone/bitpim/files/maketarball new file mode 100755 index 000000000000..8df7f071df9a --- /dev/null +++ b/app-mobilephone/bitpim/files/maketarball @@ -0,0 +1,30 @@ +# For building the tarball. To be used only by ebuild maintainers +DISTDIR=/usr/portage/distfiles +PN=bitpim +PV=$1 +P=$PN-$PV + +if [ -z "$PV" ]; then + echo "usage: $0 version" +else + svnrev=$(svn log -q --limit 1 https://${PN}.svn.sourceforge.net/svnroot/${PN}/releases/${PV} | sed -r '/^[^r]/d;s/^r([0-9]+) .*$/\1/') + [ $? = 0 ] || return 1 + + #Fetch the source (only those directories that are needed) + cd "${DISTDIR}" && mkdir -p ${P} || return 1 + for x in resources packaging src ; do + svn export https://${PN}.svn.sourceforge.net/svnroot/${PN}/releases/${PV}/${x} ${P}/${x} || return 1 + done + + #Remove unneeded stuff + rm ${P}/resources/*.chm ${P}/src/package.py + + #Freeze version and set vendor name to Gentoo + sed -i -e 's/\(^__FROZEN__="[$]Id: \).*\( $"\)/\1'${svnrev}'\2/' \ + -e 's/^vendor=".*"/vendor="Gentoo"/' \ + ${P}/src/version.py || return 1 + + #Make the tarball + tar -cjf ${P}.tar.bz2 ${P} + rm -r ${P} +fi |