Skip to content

Instantly share code, notes, and snippets.

@MadeOfMagicAndWires
Last active August 29, 2015 14:09
Show Gist options
  • Save MadeOfMagicAndWires/9c80113cfbf432068fce to your computer and use it in GitHub Desktop.
Save MadeOfMagicAndWires/9c80113cfbf432068fce to your computer and use it in GitHub Desktop.
Sixcells PKGBUILD; Freudian slippery ahead!
# Maintainer: Joost Bremmer <toost dot b at gmail dot com>
pkgname=sixcells-git
pkgver=2.0.0.1.r0.g48dd292
pkgrel=1
pkgdesc="An open-source level editor for Hexcells."
arch=('any')
url="https://github.com/BlaXpirit/sixcells"
license=('GPL3')
depends=('python'
'python-pulp'
'python-pyqt4')
_gitname='sixcells'
makedepends=('python'
'git')
optdepends=('glpk: Puzzle Solver')
source=("git+https://github.com/BlaXpirit/${_gitname}.git"
'setup.py')
sha256sums=('SKIP'
'fc8fd50ddb67b44f575a84633cb6bf4ff217451e41b226ec1c6b58e01bdfe386')
pkgver () {
cd "${srcdir}/${_gitname}"
git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
prepare () {
cd "${srcdir}/${_gitname}"
git submodule init
git submodule update
}
package() {
cd "${srcdir}"
python setup.py install --prefix=/usr --root="$pkgdir/" --optimize=1
cd "${pkgdir}"
#Symbolic links for /usr/bin used to go here, but are better left as post-install, or actual files.
}
#!/usr/bin/env python
from distutils.core import setup
setup(name='sixcells',
description='Level editor for Hexcells',
author='BlaXpirit',
url='https://github.com/BlaXpirit/sixcells',
packages=['sixcells','sixcells.universal-qt'],
package_data={'wmal': ['resources/*']}
)
@MadeOfMagicAndWires
Copy link
Author

When thinking about it, linking some executables to /usr/bin might be better left to a post-install script, or separate executable files. Symbolic links get kind of wonky in PKGBUILDs.

I was also in the process of making some .desktop files, but I never got to test those, so I didn't include them in here.

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