Commit bd5be0e6 authored by matt mooney's avatar matt mooney Committed by Allan McRae
Browse files

prototypes: cleanup



Quote all variables; change to the extended test keyword; and a few
other minor changes for consistency across PKGBUILDs.
Signed-off-by: default avatarmatt mooney <mfm@muteddisk.com>
Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent a02cc4e4
...@@ -27,22 +27,22 @@ source=() ...@@ -27,22 +27,22 @@ source=()
noextract=() noextract=()
md5sums=() #generate with 'makepkg -g' md5sums=() #generate with 'makepkg -g'
_bzrtrunk="BZRURL" _bzrtrunk=BZRURL
_bzrmod="MODENAME" _bzrmod=MODNAME
build() { build() {
cd "$srcdir" cd "$srcdir"
msg "Connecting to Bazaar server...." msg "Connecting to Bazaar server...."
if [ -d $_bzrmod ] ; then if [[ -d "$_bzrmod" ]]; then
cd ${_bzrmod} && bzr --no-plugins pull ${_bzrtrunk} -r ${pkgver} cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver"
msg "The local files are updated." msg "The local files are updated."
else else
bzr --no-plugins branch ${_bzrtrunk} ${_bzrmod} -q -r ${pkgver} bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
fi fi
msg "Bazaar checkout done or server timeout" msg "Bazaar checkout done or server timeout"
msg "Starting make..." msg "Starting build..."
rm -rf "$srcdir/$_bzrmod-build" rm -rf "$srcdir/$_bzrmod-build"
cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build" cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build"
...@@ -51,7 +51,6 @@ build() { ...@@ -51,7 +51,6 @@ build() {
# #
# BUILD HERE # BUILD HERE
# #
./autogen.sh ./autogen.sh
./configure --prefix=/usr ./configure --prefix=/usr
make make
...@@ -61,3 +60,5 @@ package() { ...@@ -61,3 +60,5 @@ package() {
cd "$srcdir/$_bzrmod-build" cd "$srcdir/$_bzrmod-build"
make DESTDIR="$pkgdir/" install make DESTDIR="$pkgdir/" install
} }
# vim:set ts=2 sw=2 et:
...@@ -27,32 +27,31 @@ source=() ...@@ -27,32 +27,31 @@ source=()
noextract=() noextract=()
md5sums=() #generate with 'makepkg -g' md5sums=() #generate with 'makepkg -g'
_cvsroot="CVSROOT" _cvsroot=CVSROOT
_cvsmod="MODNAME" _cvsmod=MODNAME
build() { build() {
cd "$srcdir" cd "$srcdir"
msg "Connecting to $_cvsmod.sourceforge.net CVS server...." msg "Connecting to $_cvsmod.sourceforge.net CVS server...."
if [ -d $_cvsmod/CVS ]; then
cd $_cvsmod if [[ -d "$_cvsmod/CVS" ]]; then
cd "$_cvsmod"
cvs -z3 update -d cvs -z3 update -d
else else
cvs -z3 -d $_cvsroot co -D $pkgver -f $_cvsmod cvs -z3 -d "$_cvsroot" co -D "$pkgver" -f "$_cvsmod"
cd $_cvsmod cd "$_cvsmod"
fi fi
msg "CVS checkout done or server timeout" msg "CVS checkout done or server timeout"
msg "Starting make..." msg "Starting build..."
rm -rf "$srcdir/$_cvsmod-build" rm -rf "$srcdir/$_cvsmod-build"
cp -r "$srcdir/$_cvsmod" "$srcdir/$_cvsmod-build" cp -r "$srcdir/$_cvsmod" "$srcdir/$_cvsmod-build"
cd "$srcdir/$_cvsmod-build" cd "$srcdir/$_cvsmod-build"
# #
# BUILD HERE # BUILD HERE
# #
./autogen.sh ./autogen.sh
./configure --prefix=/usr ./configure --prefix=/usr
make make
...@@ -62,3 +61,5 @@ package() { ...@@ -62,3 +61,5 @@ package() {
cd "$srcdir/$_cvsmod-build" cd "$srcdir/$_cvsmod-build"
make DESTDIR="$pkgdir/" install make DESTDIR="$pkgdir/" install
} }
# vim:set ts=2 sw=2 et:
...@@ -27,35 +27,32 @@ source=() ...@@ -27,35 +27,32 @@ source=()
noextract=() noextract=()
md5sums=() #generate with 'makepkg -g' md5sums=() #generate with 'makepkg -g'
_darcstrunk="DARCSURL" _darcstrunk=DARCSURL
_darcsmod="MODNAME" _darcsmod=MODNAME
build() { build() {
cd "$srcdir" cd "$srcdir"
msg "Checking for previous build...."
msg "Checking for previous build" if [[ -d "$_darcsmod/_darcs" ]]; then
if [[ -d $_darcsmod/_darcs ]]
then
msg "Retrieving missing patches" msg "Retrieving missing patches"
cd $_darcsmod cd "$_darcsmod"
darcs pull -a $_darcstrunk/$_darcsmod darcs pull -a "$_darcstrunk/$_darcsmod"
else else
msg "Retrieving complete sources" msg "Retrieving complete sources"
darcs get --partial --set-scripts-executable $_darcstrunk/$_darcsmod darcs get --partial --set-scripts-executable "$_darcstrunk/$_darcsmod"
cd $_darcsmod cd "$_darcsmod"
fi fi
rm -rf "$srcdir/$_darcsmod-build" rm -rf "$srcdir/$_darcsmod-build"
cp -r "$srcdir/$_darcsmod" "$srcdir/$_darcsmod-build" cp -r "$srcdir/$_darcsmod" "$srcdir/$_darcsmod-build"
cd "$srcdir/$_darcsmod-build" cd "$srcdir/$_darcsmod-build"
msg "Starting build" msg "Starting build..."
# #
# BUILD # BUILD HERE
# #
./autogen.sh ./autogen.sh
./configure --prefix=/usr ./configure --prefix=/usr
make make
...@@ -65,3 +62,5 @@ package() { ...@@ -65,3 +62,5 @@ package() {
cd "$srcdir/$_darcsmod-build" cd "$srcdir/$_darcsmod-build"
make DESTDIR="$pkgdir/" install make DESTDIR="$pkgdir/" install
} }
# vim:set ts=2 sw=2 et:
...@@ -27,22 +27,22 @@ source=() ...@@ -27,22 +27,22 @@ source=()
noextract=() noextract=()
md5sums=() #generate with 'makepkg -g' md5sums=() #generate with 'makepkg -g'
_gitroot="GITURL" _gitroot=GITURL
_gitname="MODENAME" _gitname=MODENAME
build() { build() {
cd "$srcdir" cd "$srcdir"
msg "Connecting to GIT server...." msg "Connecting to GIT server...."
if [ -d $_gitname ] ; then if [[ -d "$_gitname" ]]; then
cd $_gitname && git pull origin cd "$_gitname" && git pull origin
msg "The local files are updated." msg "The local files are updated."
else else
git clone $_gitroot $_gitname git clone "$_gitroot" "$_gitname"
fi fi
msg "GIT checkout done or server timeout" msg "GIT checkout done or server timeout"
msg "Starting make..." msg "Starting build..."
rm -rf "$srcdir/$_gitname-build" rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
...@@ -51,7 +51,6 @@ build() { ...@@ -51,7 +51,6 @@ build() {
# #
# BUILD HERE # BUILD HERE
# #
./autogen.sh ./autogen.sh
./configure --prefix=/usr ./configure --prefix=/usr
make make
...@@ -61,3 +60,5 @@ package() { ...@@ -61,3 +60,5 @@ package() {
cd "$srcdir/$_gitname-build" cd "$srcdir/$_gitname-build"
make DESTDIR="$pkgdir/" install make DESTDIR="$pkgdir/" install
} }
# vim:set ts=2 sw=2 et:
...@@ -38,8 +38,10 @@ package() { ...@@ -38,8 +38,10 @@ package() {
cd "$srcdir/$pkgname-$pkgver" cd "$srcdir/$pkgname-$pkgver"
make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir/" install make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir/" install
install -m755 -d "$pkgdir"/usr/share/gconf/schemas install -m755 -d "$pkgdir/usr/share/gconf/schemas"
gconf-merge-schema "$pkgdir"/usr/share/gconf/schemas/${pkgname}.schemas \ gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" \
"$pkgdir"/etc/gconf/schemas/*.schemas "$pkgdir"/etc/gconf/schemas/*.schemas
rm -f "$pkgdir"/etc/gconf/schemas/*.schemas rm -f "$pkgdir"/etc/gconf/schemas/*.schemas
} }
# vim:set ts=2 sw=2 et:
...@@ -32,8 +32,8 @@ build() { ...@@ -32,8 +32,8 @@ build() {
runhaskell Setup build runhaskell Setup build
# #
# Setup registration phase for library packages # Setup registration phase for library packages. This also requires an install
# Also requires an install script. See proto-haskell.install # script; see proto-haskell.install.
# #
runhaskell Setup register --gen-script runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script runhaskell Setup unregister --gen-script
...@@ -43,8 +43,8 @@ package() { ...@@ -43,8 +43,8 @@ package() {
cd "$srcdir/***-$pkgver" cd "$srcdir/***-$pkgver"
runhaskell Setup copy --destdir="$pkgdir/" runhaskell Setup copy --destdir="$pkgdir/"
install -Dm744 register.sh "$pkgdir"/usr/share/haskell/$pkgname/register.sh install -Dm744 register.sh "$pkgdir/usr/share/haskell/$pkgname/register.sh"
install -m744 unregister.sh "$pkgdir"/usr/share/haskell/$pkgname/unregister.sh install -m744 unregister.sh "$pkgdir/usr/share/haskell/$pkgname/unregister.sh"
} }
# vim:set ts=2 sw=2 et: # vim:set ts=2 sw=2 et:
...@@ -27,23 +27,23 @@ source=() ...@@ -27,23 +27,23 @@ source=()
noextract=() noextract=()
md5sums=() #generate with 'makepkg -g' md5sums=() #generate with 'makepkg -g'
_hgroot="HGURL" _hgroot=HGURL
_hgrepo="MODENAME" _hgrepo=REPONAME
build() { build() {
cd "$srcdir" cd "$srcdir"
msg "Connecting to Mercurial server...." msg "Connecting to Mercurial server...."
if [ -d $_hgrepo ] ; then if [[ -d "$_hgrepo" ]]; then
cd $_hgrepo cd "$_hgrepo"
hg pull -u hg pull -u
msg "The local files are updated." msg "The local files are updated."
else else
hg clone $_hgroot $_hgrepo hg clone "$_hgroot" "$_hgrepo"
fi fi
msg "Mercurial checkout done or server timeout" msg "Mercurial checkout done or server timeout"
msg "Starting make..." msg "Starting build..."
rm -rf "$srcdir/$_hgrepo-build" rm -rf "$srcdir/$_hgrepo-build"
cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build" cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
...@@ -52,7 +52,6 @@ build() { ...@@ -52,7 +52,6 @@ build() {
# #
# BUILD HERE # BUILD HERE
# #
./autogen.sh ./autogen.sh
./configure --prefix=/usr ./configure --prefix=/usr
make make
...@@ -62,3 +61,5 @@ package() { ...@@ -62,3 +61,5 @@ package() {
cd "$srcdir/$_hgrepo-build" cd "$srcdir/$_hgrepo-build"
make DESTDIR="$pkgdir/" install make DESTDIR="$pkgdir/" install
} }
# vim:set ts=2 sw=2 et:
...@@ -7,13 +7,16 @@ ...@@ -7,13 +7,16 @@
# information on Perl packaging. # information on Perl packaging.
# Maintainer: Your Name <youremail@domain.com> # Maintainer: Your Name <youremail@domain.com>
pkgname=perl-foo-bar _author=AUTHOR_NAME
_perlmod=MODNAME
pkgname=perl-$_perlmod
pkgver=VERSION pkgver=VERSION
pkgrel=1 pkgrel=1
pkgdesc="" pkgdesc=""
arch=() arch=()
url="" url=""
license=('GPL' 'PerlArtistic') license=('GPL' 'PerlArtistic')
groups=()
depends=('perl>=5.10.0') depends=('perl>=5.10.0')
makedepends=() makedepends=()
provides=() provides=()
...@@ -26,22 +29,22 @@ source=(http://search.cpan.org/CPAN/authors/id/***/***-$pkgver.tar.gz) ...@@ -26,22 +29,22 @@ source=(http://search.cpan.org/CPAN/authors/id/***/***-$pkgver.tar.gz)
md5sums=() md5sums=()
build() { build() {
cd "$srcdir/***-$pkgver" cd "$srcdir/$_perlmod-$pkgver"
# install module in vendor directories. # Install module in vendor directories.
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
make make
## for packages with Build.PL, do this instead: ## For packages with Build.PL, do this instead:
# perl Build.PL installdirs=vendor destdir="$pkgdir/" # perl Build.PL installdirs=vendor destdir="$pkgdir/"
# perl Build # perl Build
} }
package() { package() {
cd "$srcdir/***-$pkgver" cd "$srcdir/$_perlmod-$pkgver"
make install DESTDIR="$pkgdir/" make install DESTDIR="$pkgdir/"
## for packages with Build.PL, do this instead: ## For packages with Build.PL, do this instead:
# perl Build install # perl Build install
} }
......
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
# information on Python packaging. # information on Python packaging.
# Maintainer: Your Name <youremail@domain.com> # Maintainer: Your Name <youremail@domain.com>
pkgname=python-<modulename> pkgname=python-NAME
pkgver=VERSION pkgver=VERSION
pkgrel=1 pkgrel=1
pkgdesc="" pkgdesc=""
arch=() arch=()
url="" url=""
license=('GPL') license=('GPL')
groups=()
depends=('python') depends=('python')
makedepends=() makedepends=()
provides=() provides=()
...@@ -26,8 +27,8 @@ source=() ...@@ -26,8 +27,8 @@ source=()
md5sums=() md5sums=()
package() { package() {
cd "$srcdir/***-$pkgver" cd "$srcdir/$pkgname-$pkgver"
python setup.py install --root=$pkgdir/ --optimize=1 python setup.py install --root="$pkgdir/" --optimize=1
} }
# vim:set ts=2 sw=2 et: # vim:set ts=2 sw=2 et:
...@@ -21,12 +21,12 @@ noextract=(GEMNAME-$pkgver.gem) ...@@ -21,12 +21,12 @@ noextract=(GEMNAME-$pkgver.gem)
md5sums=() md5sums=()
package() { package() {
cd $srcdir cd "$srcdir"
# _gemdir is defined inside package() because if ruby[gems] is not installed on the system # _gemdir is defined inside package() because if ruby[gems] is not installed on the system
# makepkg will exit with an error when sourcing the PKGBUILD # makepkg will exit with an error when sourcing the PKGBUILD
local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
gem install --ignore-dependencies -i "$pkgdir$_gemdir" GEMNAME-$pkgver.gem gem install --ignore-dependencies -i "$pkgdir$_gemdir" "GEMNAME-$pkgver.gem"
} }
# vim:set ts=2 sw=2 et: # vim:set ts=2 sw=2 et:
...@@ -28,26 +28,27 @@ noextract=() ...@@ -28,26 +28,27 @@ noextract=()
md5sums=() #generate with 'makepkg -g' md5sums=() #generate with 'makepkg -g'
_svntrunk=SVNURL _svntrunk=SVNURL
_svnmod=MODENAME _svnmod=MODNAME
build() { build() {
cd "$srcdir" cd "$srcdir"
msg "Connecting to SVN server...."
if [ -d $_svnmod/.svn ]; then if [[ -d "$_svnmod/.svn" ]]; then
(cd $_svnmod && svn up -r $pkgver) (cd "$_svnmod" && svn up -r "$pkgver")
else else
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
fi fi
msg "SVN checkout done or server timeout" msg "SVN checkout done or server timeout"
msg "Starting make..." msg "Starting build..."
rm -rf "$srcdir/$_svnmod-build" rm -rf "$srcdir/$_svnmod-build"
cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build" cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
cd "$srcdir/$_svnmod-build" cd "$srcdir/$_svnmod-build"
# #
# BUILD # BUILD HERE
# #
./autogen.sh ./autogen.sh
./configure --prefix=/usr ./configure --prefix=/usr
...@@ -58,3 +59,5 @@ package() { ...@@ -58,3 +59,5 @@ package() {
cd "$srcdir/$_svnmod-build" cd "$srcdir/$_svnmod-build"
make DESTDIR="$pkgdir/" install make DESTDIR="$pkgdir/" install
} }
# vim:set ts=2 sw=2 et:
pkgname=NAME pkgname=NAME
post_install() { post_install() {
usr/sbin/gconfpkg --install ${pkgname} usr/sbin/gconfpkg --install "$pkgname"
update-desktop-database -q update-desktop-database -q
} }
pre_upgrade() { pre_upgrade() {
pre_remove $1 pre_remove "$1"
} }
post_upgrade() { post_upgrade() {
post_install $1 post_install "$1"
} }
pre_remove() { pre_remove() {
usr/sbin/gconfpkg --uninstall ${pkgname} usr/sbin/gconfpkg --uninstall "$pkgname"
} }
post_remove() { post_remove() {
update-desktop-database -q update-desktop-database -q
} }
# vim:set ts=2 sw=2 et:
pkgname=NAME pkgname=NAME
HS_DIR=usr/share/haskell/$pkgname HS_DIR="usr/share/haskell/$pkgname"
post_install() { post_install() {
${HS_DIR}/register.sh "$HS_DIR/register.sh"
} }
pre_upgrade() { pre_upgrade() {
$