Skip to content

Instantly share code, notes, and snippets.

@vomikan
Forked from comigor/PKGBUILD
Last active August 29, 2015 14:12
Show Gist options
  • Save vomikan/0398d65a41f8f21abcc7 to your computer and use it in GitHub Desktop.
Save vomikan/0398d65a41f8f21abcc7 to your computer and use it in GitHub Desktop.
# Maintainer: Igor Borges <igor@borges.me>
_pkgname=mmex
pkgname=mmex-git
pkgver=1.1.r347.gc991818
pkgrel=1
pkgdesc="Money Manager Ex"
arch=('i686' 'x86_64')
url="http://www.moneymanagerex.org/"
license=('GPL')
depends=('wxgtk') # Dunno if wxgtk or wxgtk2.8
makedepends=('git' 'gettext')
provides=('mmex')
conflicts=('mmex')
options=(!strip)
source=("$_pkgname::git://github.com/moneymanagerex/moneymanagerex.git")
md5sums=('SKIP'
'3809d26cbae145842e56f374192e56d9')
install=${_pkgname}.install
pkgver() {
cd "$_pkgname"
# Get new tags from remote
git fetch --tags
# Get latest tag name
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
# Checkout latest tag
git checkout $latestTag
}
prepare() {
cd "$_pkgname"
git submodule update --init
}
build() {
cd "$_pkgname"
./bootstrap
./configure --prefix=/usr \
--enable-unicode \
--enable-shared \
--with-wxshared \
--with-gtk \
--with-wx-config=/usr/lib/wx/config/gtk2-unicode-3.0 \
#LIBS="-ldl -lm -lpthread"
make -j4
}
package() {
cd "$_pkgname"
make DESTDIR="$pkgdir" install
}
install() {
gtk-update-icon-cache "${pkgdir}/usr/share/icons/hicolor"
}
@Narrat
Copy link

Narrat commented Jul 10, 2015

Didn't notice the comments and questions you had back then.

The stuff in the pkgver is not needed. VCS handling allows to add #commit= or #tag= or #branch= to adjust such things.
See the Repo-PKGBuild how it looks like
https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/moneymanagerex

@Narrat
Copy link

Narrat commented Jul 10, 2015

Although.. thinking about it, this is a kinda interesting way to get the latest version automatically.
Which isn't possible with the "normal" way.
Still, not sure if the pkgver() should be used like that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment