Skip to content

Commit

Permalink
Updated geany-astyle to current packaging guidelines, namely breaking…
Browse files Browse the repository at this point in the history
… up the monolithic build() function to appropriate PKGBUILD functions.
  • Loading branch information
jamesan committed Jan 10, 2015
1 parent 8e0b888 commit f5e1875
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions geany-astyle/PKGBUILD
@@ -1,20 +1,32 @@
# Contributor: Tim Buecher <timbuecher.dev@gmail.com>
# Maintainer: Tim Buecher <timbuecher.dev@gmail.com>
# Contributor: James An <james@jamesan.ca>

pkgname=geany-astyle
pkgver=0.2.1
pkgrel=1
pkgdesc="Sourcecode formater/beautifier based on AStyle for Geany"
url="https://launchpad.net/geany-astyle"
arch=("i686" "x86_64")
license="GPL"
pkgrel=2
pkgdesc='Sourcecode formatter/beautifier based on AStyle for Geany'
url='https://launchpad.net/geany-astyle'
arch=('i686' 'x86_64')
license='GPL3'
depends=('geany' 'astyle')
source=("https://github.com/downloads/m0jo/geany-astyle/$pkgname-$pkgver.tar.gz")
md5sums=('80aea4b1bba2189708fe068c0d3b6fc1')
makedepends=('unzip')
source=("https://launchpad.net/$pkgname/trunk/0.2.1/+download/astyle-plugin-src-$pkgver.zip")
md5sums=('d3ef9979426d217a3c6becb5ecad4422')
noextract=("astyle-plugin-src-$pkgver.zip")

build() {
tar -xvf $pkgname-$pkgver.tar.gz
cd "$srcdir/$pkgname-$pkgver"
gcc main.c -O2 -fPIC `pkg-config --cflags geany` -lastyle -shared `pkg-config --libs geany` -o "astyle_plugin.so"
prepare() {
unzip -o "astyle-plugin-src-$pkgver.zip"
}

build() {
cd "astyle-plugin-src-$pkgver/src"

gcc main.c -O2 -fPIC `pkg-config --cflags geany` -lastyle-2.05.1 -shared `pkg-config --libs geany` -o "astyle_plugin.so"
}

package() {
cd "astyle-plugin-src-$pkgver"

install -Dm755 astyle_plugin.so "$pkgdir/usr/lib/geany/astyle_plugin.so"
install -Dm644 readme.txt "$pkgdir/usr/share/doc/geany/README.txt"
install -Dm644 src/astyle_plugin.so "$pkgdir/usr/share/geany/astyle_plugin.so"
}

0 comments on commit f5e1875

Please sign in to comment.