2009-09-28 21:57:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
PACKAGE=BTstack
|
|
|
|
|
2010-01-23 23:23:16 +00:00
|
|
|
svn update
|
|
|
|
|
2009-09-28 21:57:48 +00:00
|
|
|
VERSION=0.1
|
|
|
|
REVISION=`svn info | grep Revision | cut -d " " -f 2`
|
|
|
|
ARCHIVE=$PACKAGE-$VERSION-$REVISION.deb
|
|
|
|
|
|
|
|
echo Creating $PACKAGE package version $VERSION revision $REVISION
|
2009-10-29 19:52:37 +00:00
|
|
|
sudo rm -rf $PACKAGE
|
2009-09-28 21:57:48 +00:00
|
|
|
|
|
|
|
mkdir -p $PACKAGE/DEBIAN
|
|
|
|
cp resources/control $PACKAGE/DEBIAN
|
|
|
|
echo "Version: $VERSION-$REVISION" >> $PACKAGE/DEBIAN/control
|
|
|
|
|
|
|
|
mkdir -p $PACKAGE/usr/local/bin
|
|
|
|
cp src/BTdaemon $PACKAGE/usr/local/bin
|
2009-12-14 22:42:14 +00:00
|
|
|
cp example/inquiry $PACKAGE/usr/local/bin
|
2009-09-28 21:57:48 +00:00
|
|
|
|
|
|
|
mkdir -p $PACKAGE/usr/local/lib
|
|
|
|
cp src/libBTstack.dylib $PACKAGE/usr/local/lib
|
|
|
|
|
2009-10-29 21:21:02 +00:00
|
|
|
mkdir -p $PACKAGE/System/Library/CoreServices/SpringBoard.app
|
|
|
|
cp resources/*.png $PACKAGE/System/Library/CoreServices/SpringBoard.app
|
2009-09-28 21:57:48 +00:00
|
|
|
|
|
|
|
mkdir -p $PACKAGE/Library/LaunchDaemons/
|
|
|
|
cp resources/ch.ringwald.BTstack.plist $PACKAGE/Library/LaunchDaemons/
|
|
|
|
|
2009-10-29 21:16:33 +00:00
|
|
|
echo "#!/bin/sh" > $PACKAGE/DEBIAN/postinst
|
2009-10-29 21:35:26 +00:00
|
|
|
echo "/bin/launchctl unload /Library/LaunchDaemons/ch.ringwald.BTstack.plist 2&> /dev/null" >> $PACKAGE/DEBIAN/postinst
|
2009-10-29 21:29:25 +00:00
|
|
|
echo "/bin/launchctl load /Library/LaunchDaemons/ch.ringwald.BTstack.plist" >> $PACKAGE/DEBIAN/postinst
|
2009-10-29 21:16:33 +00:00
|
|
|
chmod +x $PACKAGE/DEBIAN/postinst
|
|
|
|
echo "#!/bin/sh" > $PACKAGE/DEBIAN/prerm
|
|
|
|
echo "/bin/launchctl unload /Library/LaunchDaemons/ch.ringwald.BTstack.plist" >> $PACKAGE/DEBIAN/prerm
|
|
|
|
chmod +x $PACKAGE/DEBIAN/prerm
|
|
|
|
|
2009-10-29 19:51:18 +00:00
|
|
|
# set ownership to root:root
|
|
|
|
sudo chown -R 0:0 $PACKAGE
|
2009-09-28 21:57:48 +00:00
|
|
|
|
|
|
|
echo Packaging $PACKAGE
|
|
|
|
export COPYFILE_DISABLE
|
|
|
|
export COPY_EXTENDED_ATTRIBUTES_DISABLE
|
|
|
|
dpkg-deb -b $PACKAGE $ARCHIVE
|
|
|
|
dpkg-deb --info $ARCHIVE
|
|
|
|
dpkg-deb --contents $ARCHIVE
|