aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorwattazoum <wattazoum@svn>2009-11-29 09:37:27 +0000
committerwattazoum <wattazoum@svn>2009-11-29 09:37:27 +0000
commit7f81e652b137d7f8bf5788e3bf5e02490dd8dc35 (patch)
tree6e6fb8dd843fbde33eaa90fedd4444176443e60e /tools
parent5f582e32d262974f58b8cbb01c775a55f3f01638 (diff)
[packaging] * strongly base the hardy rules file on debhelper
* add xbmc-send package * split binary and non-binary target in rules.hardy * fix the svn revision guessing which could return a String that is not a revision. * clean up the ppa-builder script. [makefile] * split 'install-binaries' to add 'install-scripts' target (arch indep) git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@25112 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools')
-rw-r--r--tools/Linux/packaging/debian/control25
-rwxr-xr-xtools/Linux/packaging/debian/rules6
-rw-r--r--tools/Linux/packaging/debian/rules.hardy147
-rw-r--r--tools/Linux/packaging/debian/xbmc-eventclients-xbmc-send.install1
-rw-r--r--tools/Linux/packaging/ppa-builder.sh104
5 files changed, 132 insertions, 151 deletions
diff --git a/tools/Linux/packaging/debian/control b/tools/Linux/packaging/debian/control
index f695112424..b21b910a85 100644
--- a/tools/Linux/packaging/debian/control
+++ b/tools/Linux/packaging/debian/control
@@ -471,3 +471,28 @@ Description: XBMC Media Center (Event Client PS3 package)
multimedia jukebox.
.
This package is the PS3 package for XBMC Event Client.
+
+Package: xbmc-eventclients-xbmc-send
+Architecture: all
+Depends: xbmc-eventclients-common (= ${binary:Version}),
+ ${python:Depends},
+ ${misc:Depends}
+Description: XBMC Media Center (Event Client XBMC-SEND package)
+ XBMC, recursive acronym for "XBMC Media Center", is an award winning free and
+ open source software media-player and entertainment hub for all your digital
+ media. XBMC is available for Linux, Mac OS X (Leopard, Tiger and Apple TV)
+ and Microsoft Windows, as well as the original Xbox game console. Created in
+ 2003 by a group of like minded programmers, XBMC is a non-profit project run
+ and developed by volunteers located around the world. More than 50 software
+ developers have contributed to XBMC, and 100-plus translators have worked to
+ expand its reach, making it available in more than 30 languages.
+ .
+ While XBMC functions very well as a standard media player application for
+ your computer, it has been designed to be the perfect companion for your
+ HTPC. Supporting an almost endless range of remote controls, and combined
+ with its beautiful interface and powerful skinning engine, XBMC feels very
+ natural to use from the couch and is the ideal solution for your home
+ theater. Once installed, your computer will become a fully functional
+ multimedia jukebox.
+ .
+ This package is the XBMC-SEND package for XBMC Event Client.
diff --git a/tools/Linux/packaging/debian/rules b/tools/Linux/packaging/debian/rules
index 0da99208e0..e8ea202f2f 100755
--- a/tools/Linux/packaging/debian/rules
+++ b/tools/Linux/packaging/debian/rules
@@ -6,7 +6,11 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
# Get the SVN revision from the changelog
-SVNVERSION ?= $(shell dpkg-parsechangelog | grep '^Version:' | sed 's/.*svn\([[:digit:]]*\).*/\1/')
+SVNVERSION ?= $(shell dpkg-parsechangelog | grep '^Version:' | grep 'svn' | sed 's/.*svn\([[:digit:]]*\).*/\1/')
+
+ifeq "$(SVNVERSION)" ""
+ SVNVERSION = $(shell cat debian/svnrevision)
+endif
# List of options to pass to configure. Can be overridden.
XBMC_CONFIG_OPTIONS ?= --host=$(DEB_HOST_GNU_TYPE) \
diff --git a/tools/Linux/packaging/debian/rules.hardy b/tools/Linux/packaging/debian/rules.hardy
index 84db2ed50e..3d91bc3a7f 100644
--- a/tools/Linux/packaging/debian/rules.hardy
+++ b/tools/Linux/packaging/debian/rules.hardy
@@ -21,117 +21,74 @@ export DH_OPTIONS
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
#get the svnversion if the file exists
-SVNVERSION ?= $(shell dpkg-parsechangelog | grep '^Version:' | sed 's/.*svn\([[:digit:]]*\).*/\1/')
+SVNVERSION ?= $(shell dpkg-parsechangelog | grep '^Version:' | grep 'svn' | sed 's/.*svn\([[:digit:]]*\).*/\1/')
ifeq "$(SVNVERSION)" ""
- ifneq "$(shell cat debian/svnrevision)" ""
- SVNVERSION ?= $(shell cat debian/svnrevision)
- endif
+ SVNVERSION = $(shell cat debian/svnrevision)
endif
-config-stamp:
+
+clean:
+ dh clean
+ rm -f build-arch-stamp build-indep-stamp config-stamp
+
+build:
dh_testdir
# Add here commands to configure the package.
./bootstrap
dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --enable-vdpau --enable-avahi SVN_REV="$(SVNVERSION)"
- touch $@
-
-#Architecture
-build: build-arch
-
-build-arch: build-arch-stamp
-build-arch-stamp: config-stamp
-
- # Add here commands to compile the arch part of the package.
- dh_auto_build -- externals xbmc.bin xbmc-xrandr
- touch $@
-
-build-indep: build-indep-stamp
-build-indep-stamp: config-stamp
+ dh build --after dh_auto_configure
- # Add here commands to compile the indep part of the package.
- $(MAKE) skins
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-arch-stamp build-indep-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) distclean
- rm -f config-stamp
-
- dh_clean
+binary: binary-arch binary-indep
-install: install-indep install-arch
-install-indep:
- dh_testdir
- dh_testroot
- dh_clean -i
- dh_prep -i
- dh_installdirs -i
+binary-indep:
+ dh binary-indep --until dh_installdirs
$(MAKE) install-web install-datas install-livedatas prefix=$(CURDIR)/debian/tmp/usr/
-
+ mkdir -p $(CURDIR)/debian/tmp/usr/share/applications $(CURDIR)/debian/tmp/usr/share/pixmaps
+ cp $(CURDIR)/tools/Linux/xbmc.png $(CURDIR)/debian/tmp/usr/share/pixmaps/
+ cp $(CURDIR)/tools/Linux/xbmc.desktop $(CURDIR)/debian/tmp/usr/share/applications/
# xbmc Live files
mkdir -p $(CURDIR)/debian/tmp/etc/init/
cp $(CURDIR)/tools/XBMCLive/xbmc-live.conf $(CURDIR)/debian/tmp/etc/init/
cp $(CURDIR)/tools/XBMCLive/xbmc-live-install.conf $(CURDIR)/debian/tmp/etc/init/
+ dh_install -i --sourcedir=$(CURDIR)/debian/tmp -XLICENCE -XLiberationSans-Regular.ttf -XLicence.txt -XLicense.txt
# XBMC WEB PM
- mkdir -p $(CURDIR)/debian/xbmc-web-pm/usr/share/xbmc/web
- cp -a $(CURDIR)/web/Project_Mayhem -d $(CURDIR)/debian/xbmc-web-pm/usr/share/xbmc/web
- # XBMC WEB PM 3
- mkdir -p $(CURDIR)/debian/xbmc-web-pm3/usr/share/xbmc/web
- cp -a $(CURDIR)/web/Project_Mayhem_III -d $(CURDIR)/debian/xbmc-web-pm/usr/share/xbmc/web
+ dh_install -pxbmc-web-pm ../../web/Project_Mayhem usr/share/xbmc/web
+ # XBMC WEB PM3
+ dh_install -pxbmc-web-pm3 ../../web/Project_Mayhem_III usr/share/xbmc/web
# XBMC WEB Iphone
- mkdir -p $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/xbmc
- cp -a $(CURDIR)/web/xbmciphone -d $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/xbmc/web
- mkdir -p $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/doc/xbmc-web-iphone-tlrobinson/
- mv $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/xbmc/web/README $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/doc/xbmc-web-iphone-tlrobinson/
-
-install-arch:
- dh_testdir
- dh_testroot
- dh_clean -s
- dh_prep -s
- dh_installdirs -s
-
- # Add here commands to install the arch part of the package into
- # debian/tmp/usr/share/xbmc
- make install-binaries install-arch prefix=$(CURDIR)/debian/tmp/usr/
-
- make eventclients prefix=$(CURDIR)/debian/tmp/usr/ installdir=/usr WII_EXTRA_OPTS=-DCWIID_OLD
-
- dh_install -s --sourcedir=$(CURDIR)/debian/tmp
-
-# Must not depend on anything. This is to be called by
-# binary-arch/binary-indep
-# in another 'make' thread.
-binary-common:
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_installinit
- dh_pysupport
- dh_link
- dh_strip --dbg-package=xbmc-dbg
- dh_fixperms
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-# Build architecture independant packages using the common target.
-binary-indep: build-indep install-indep
- $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
-
-# Build architecture dependant packages using the common target.
-binary-arch: build-arch install-arch
- $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
-
-binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
+ dh_install -pxbmc-web-iphone-tlrobinson ../../web/xbmciphone/iphone usr/share/xbmc/web
+ dh_installdocs -i
+ dh_installdocs -pxbmc-web-iphone-tlrobinson $(CURDIR)/web/xbmciphone/README
+ dh binary-indep --after dh_installdocs
+
+binary-arch:
+ dh binary-arch --until dh_installdirs
+ $(MAKE) install-binaries install-arch prefix=$(CURDIR)/debian/tmp/usr/
+ find "debian/tmp/usr/share/xbmc" -regextype posix-extended \
+ -type f -iregex \
+ ".*\.so|.*\.vis|.*\.xbs|.*xbmc\.bin|.*xbmc-xrandr" | \
+ while read FILE; do \
+ NEW_LOCATION="$$(echo $$FILE | sed -e 's|usr/share|usr/lib|')"; \
+ install -D "$$FILE" "$$NEW_LOCATION"; \
+ rm "$$FILE"; \
+ done
+ $(MAKE) eventclients prefix=$(CURDIR)/debian/tmp/usr installdir=/usr WII_EXTRA_OPTS=-DCWIID_OLD
+ dh_install -a --sourcedir=$(CURDIR)/debian/tmp -XLICENCE -XLiberationSans-Regular.ttf -XLicence.txt -XLicense.txt
+ dh binary-arch --after dh_install --until dh_link
+ find "debian/xbmc-bin/usr/lib" -regextype posix-extended -type f | \
+ while read FILE; do \
+ LINK_TARGET="$$(echo "$$FILE" | sed -e 's|debian/xbmc-bin/||')"; \
+ LINK_DESTINATION="$$(echo "$$FILE" | sed -e 's|debian/xbmc-bin/usr/lib|usr/share|')"; \
+ dh_link -pxbmc-bin "$$LINK_TARGET" "$$LINK_DESTINATION"; \
+ done
+ dh binary-arch --after dh_link --before dh_strip
+ dh_strip -a --dbg-package=xbmc-dbg
+ # We don't install shared libraries in standard locations so don't edit
+ # postinst/postrm scripts to call ldconfig
+ dh_makeshlibs -a -n
+ dh binary-arch --after dh_makeshlibs
+
+.PHONY: build clean binary-indep binary-arch binary
diff --git a/tools/Linux/packaging/debian/xbmc-eventclients-xbmc-send.install b/tools/Linux/packaging/debian/xbmc-eventclients-xbmc-send.install
new file mode 100644
index 0000000000..6981d643da
--- /dev/null
+++ b/tools/Linux/packaging/debian/xbmc-eventclients-xbmc-send.install
@@ -0,0 +1 @@
+usr/bin/xbmc-send
diff --git a/tools/Linux/packaging/ppa-builder.sh b/tools/Linux/packaging/ppa-builder.sh
index f5426f16c3..e8adda55e9 100644
--- a/tools/Linux/packaging/ppa-builder.sh
+++ b/tools/Linux/packaging/ppa-builder.sh
@@ -2,32 +2,17 @@
usage()
{
-myEcho "For --tag|-t, use the following options:
- svnsrc=<dir>
- version=<version> (without 'xbmc-')
- "
-myEcho "For -u, use:
- srcdir=<dir>
- version=<version> (or revision)
- minor=<minor>
- "
-myEcho "For -nsg, use:
- srcdir=<dir>
- revision=<revision> (or version=<version>)
- "
-myEcho "For -prev, use:
- rev=<revision>
- "
-myEcho "You can use:
- > -debian-tag=<tag> (to select the debian directory tag to use)
- "
+echo "The following options are supported:
+ --ppa=<your ppa in dput.cf>
+ -t, --tag : svnsrc=<dir>, version=<version> (without 'xbmc-')
+ -u : srcdir=<dir> version=<version> revision=<rev> minor=<minor>
+ -nsg : svnsrc=<dir> revision=<rev>
+ -prev : revision=<rev>
+"
exit 0
}
-myEcho() {
- echo -e "$1"
- echo -e "$1" >> $BUILD_LOG
-}
+alias echo='echo -e'
BUILDALL=1
FULLDEBUILDOPTS="-S -sa"
@@ -35,14 +20,15 @@ DEBUILDOPTS="-S -sd"
MINOR=1
XBMCPPA=xbmc-svn
HVERSION=9.11~beta1
-DEBIAN_TAG_OPT=
-# Packager should have this
+# Packagers should have these two vars in their environment
# export DEBFULLNAME="Ouattara Oumar Aziz (alias wattazoum)"
# export DEBEMAIL="wattazoum@gmail.com"
parse_options()
{
+ echo "Parse options: $@"
+
for I in "$@"
do
OPT=${I%=*}
@@ -52,6 +38,7 @@ parse_options()
LOCAL=1
;;
--pbuilder|-p)
+ echo "-p ==> PBUILDER"
PBUILDER=1
LOCAL=1
;;
@@ -59,6 +46,7 @@ parse_options()
BUILDALL=0
DIST="$OPT"
DEBUILDOPTS=$FULLDEBUILDOPTS
+ echo "DIST ==> $DIST"
;;
--noclean|-nc)
NOCLEAN=1
@@ -76,11 +64,14 @@ parse_options()
-prev)
EXPORT_PREV_REV=1
;;
+ --ppa)
+ XBMCPPA=$PAR
+ ;;
--help|-h)
usage
;;
*)
- myEcho "Setting $OPT=$PAR"
+ echo "Setting $OPT=$PAR"
export $OPT=$PAR
;;
esac
@@ -90,38 +81,39 @@ parse_options()
getrootright()
{
if [[ $PBUILDER ]]; then
- myEcho "Give me the admin rights ... "
+ echo "Give me the admin rights ... "
sudo echo "Thank you !"
fi
}
preparesrc()
{
- myEcho "Exporting the sources at revision $REVISION ... "
+ echo "Exporting the sources at revision $REVISION ... "
if [[ -z $HEAD_REVISION ]]; then
# The revision given might not be the head one
- svn export -r $REVISION $SVNSRC $DESTSRC 2>&1
+ svn export -r $REVISION $SVNSRC $DESTSRC 2>&1
else
svn cleanup $SVNSRC
svn export $SVNSRC $DESTSRC
fi
- myEcho "Copying to .orig folder"
+ echo "Copying to .orig folder"
cp -a $DESTSRC $DESTSRC.orig
}
builddeb()
{
- myEcho "Copy the debian folder to the root"
+ echo "Build $1 deb package"
+ echo "Copy the debian folder to the root"
cp -a $DESTSRC/tools/Linux/packaging/debian $DESTSRC/debian
if [[ -z $CHNLG ]]; then
CHNLG="Build of $VERSION"
fi
- myEcho "Changelog : $CHNLG"
+ echo "Changelog : $CHNLG"
cd $DESTSRC
- dch -b -v ${VERSION}-$1${MINOR} -D $1 "$CHNLG" 2>&1
- myEcho "$REVISION" > debian/svnrevision
- myEcho "Building the $1 debian package"
+ dch -b -v 1:${VERSION}-$1${MINOR} -D $1 "$CHNLG" 2>&1
+ echo "$REVISION" > debian/svnrevision
+ echo "Building the $1 debian package"
if [ $1 == "hardy" ]; then
tweaks_for_hardy
@@ -141,35 +133,37 @@ builddeb()
cd $OLDPWD
if [[ $PBUILDER ]]; then
- myEcho "'pbuilder' is set. Trying into pbuilder"
- $SCRIPTDIR/pbuilder-dist $1 build xbmc_${VERSION}-$1${MINOR}.dsc 2>&1
+ echo "'pbuilder' is set. Trying into pbuilder"
+ $SCRIPTDIR/pbuilder-dist $1 build xbmc_${VERSION}-$1${MINOR}.dsc 2>&1 | tee -a $BUILD_LOG
rm -rf $DESTSRC/debian
fi
if [[ -z $LOCAL ]]; then
- myEcho "'--local' is not set. Uploading to PPA"
- dput $XBMCPPA xbmc_${VERSION}-$1${MINOR}_source.changes 2>&1
+ echo "'--local' is not set. Uploading to PPA"
+ dput $XBMCPPA xbmc_${VERSION}-$1${MINOR}_source.changes 2>&1 | tee -a $BUILD_LOG
rm -rf $DESTSRC/debian
fi
}
tweaks_for_hardy()
{
- # change debhelper version in control
+ echo "Hardy tweaking ..."
+ echo "change debhelper version in control"
mv debian/control debian/control.orig
sed -r s/"debhelper \(>= .+?\)"/"debhelper (>= 7)"/ debian/control.orig > debian/control
rm debian/control.orig
- # change the rules file.
+ echo "change the rules file."
rm -f debian/rules
cp debian/rules.hardy debian/rules
- # move the format spec to 1.0
+
+ echo "move the format spec to 1.0"
echo "1.0" > debian/source/format
}
clean()
{
if [[ -z $NOCLEAN ]] && [[ -z $LOCAL ]] ; then
- myEcho "Cleaning ... "
+ echo "Cleaning ... "
find . -depth -maxdepth 1 -regex "\./xbmc[-_].+-.+" -not -name "*.orig.tar.gz" -exec rm -rf {} \;
if [[ -z $UPDPPA ]] && [[ -z $NO_SRC_GEN ]] ; then
rm -rf xbmc-$VERSION xbmc_$VERSION.orig.tar.gz
@@ -183,8 +177,8 @@ preparevars()
gpg -s test.txt
rm test.txt test.txt.gpg
- myEcho "Preparing Vars ..."
- myEcho "Build directory: $BUILD_DIR"
+ echo "Preparing Vars ..."
+ echo "Build directory: $BUILD_DIR"
if [[ -z $SVNSRC ]]; then
SVNSRC=$(readlink -f ../../../)
@@ -215,11 +209,11 @@ preparevars()
VERSION=$version
fi
if [[ $EXPORT_PREV_REV ]]; then
- myEcho "Revision to export: $rev"
+ echo "Revision to export: $rev"
REVISION=$rev
fi
- myEcho "Setting SVN Sources: $SVNSRC"
+ echo "Setting SVN Sources: $SVNSRC"
# If the version is not yet set it
if [[ -z $REVISION ]]; then
@@ -231,16 +225,16 @@ preparevars()
VERSION=${HVERSION}+svn$REVISION
fi
- myEcho "XBMC version: $VERSION"
- myEcho "XBMC revision: $REVISION"
+ echo "XBMC version: $VERSION"
+ echo "XBMC revision: $REVISION"
# Set Destination folder if not set
if [[ -z $DESTSRC ]]; then
DESTSRC=xbmc-$VERSION
fi
- myEcho "XBMC Destination folder: $DESTSRC"
- myEcho "Package minor version: $MINOR"
+ echo "XBMC Destination folder: $DESTSRC"
+ echo "Package minor version: $MINOR"
}
@@ -248,25 +242,25 @@ preparevars()
SCRIPTDIR=`pwd`
-# We are in the source tree. Go out
if [[ -z $BUILD_DIR ]] ; then
BUILD_DIR=$(eval readlink -f ../../../../)
fi
BUILD_LOG=$BUILD_DIR/debuilder_`date +%F_%T`.log
-parse_options $@
+parse_options $@
getrootright
preparevars
+# We are in the source tree. Go out
cd $BUILD_DIR
if [[ -z $UPDPPA ]] && [[ -z $NO_SRC_GEN ]] ; then
preparesrc
fi
-for distro in "hardy" "intrepid" "jaunty" "karmic"; do
- if [[ $BUILDALL -eq 1 ]] || [[ $DIST == "$distro" ]]; then
+for distro in hardy intrepid jaunty karmic ; do
+ if [[ $BUILDALL -eq 1 ]] || [[ $DIST == $distro ]]; then
builddeb $distro
fi
done