summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Henrique Montesião de Sousa2017-11-06 13:04:20 -0200
committerGustavo Henrique Montesião de Sousa2017-11-06 13:04:20 -0200
commit1101eb39c612414230a214136a86dfb52d17eaff (patch)
treef868bdc9e2b3461605d6b94bc103ca923d24fc85
parentea5aa63a1fe605c7b1e3dc841977f4fe47f0b3b9 (diff)
downloadaur-1101eb39c612414230a214136a86dfb52d17eaff.tar.gz
Build now uses cmake
- Change build procedure to use cmake - Create a desktop file
-rw-r--r--PKGBUILD71
-rw-r--r--antimony.desktop12
2 files changed, 39 insertions, 44 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 04e58f64c8e6..33fd2003f82b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,58 +1,41 @@
-# Maintainer: Kyle Keen <keenerd@gmail.com>
+# Maintainer: Gustavo H. Montesião de Sousa <gustavo aat claroenigma dot com dot br>
+# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: Earnestly
-
pkgname=antimony-git
-pkgver=0.9.0b.r72.ge1117fe
+pkgver=0.9.3b.r12.2618d096
pkgrel=1
-pkgdesc="Graph-based 3D CSG CAD modeller"
+pkgdesc="A computer-aided design (CAD) tool from a parallel universe in which CAD software evolved from Lisp machines rather than drafting tables."
+arch=(x86_64)
url="http://www.mattkeeter.com/projects/antimony/3/"
-provides=('antimony')
-conflicts=('antimony')
-arch=('i686' 'x86_64')
license=('MIT')
-depends=('qt5-base' 'boost-libs' 'python' 'libpng' 'lemon')
-makedepends=('boost' 'git')
-source=("git+https://github.com/mkeeter/antimony.git")
-md5sums=('SKIP')
-
-# todo, replace bundled eigen with official
-
-_gitname="antimony"
-_gitbranch="master"
+depends=('qt5-base' 'python' 'boost-libs')
+makedepends=('git' 'ninja' 'lemon' 'flex' 'boost')
+provides=(${pkgname})
+source=("${pkgname}::git://github.com/mkeeter/antimony.git" "antimony.desktop")
+md5sums=('SKIP' 'SKIP')
pkgver() {
- cd "$_gitname"
- #git show -s --format="%ci" HEAD | sed -e 's/-//g' -e 's/ .*//'
- git describe | sed 's/-/.r/; s/-/./'
-}
-
-build() {
- cd "$_gitname"
-
- sed -i 's|\(executable.path =\).*|\1 /usr/bin|' app/app.pro
- sed -i 's|\(nodes_folder.path =\).*|\1 /usr/share/antimony/sb/nodes|' app/app.pro
- sed -i 's|\(fab_folder.path =\).*|\1 /usr/lib/python3.5/site-packages/fab|' app/app.pro
- sed -i 's|return path.join("/");|return "/usr/share/antimony/sb/nodes";|' app/src/app/app.cpp
+ cd "$srcdir/${pkgname}"
- mkdir -p build
- cd build
- qmake-qt5 PREFIX="/usr" ../sb.pro
- sed -i 's|/local/bin|/bin|g' Makefile
- make
+ printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
-check() {
- cd "$_gitname"
- return 0
- mkdir -p tests
- cd tests
- qmake-qt5 PREFIX="/usr" ../lib/fab/fab-tests.pro
- qmake-qt5 PREFIX="/usr" ../lib/graph/graph-tests.pro
- make
+build() {
+ cd "$srcdir/${pkgname}"
+ cmake \
+ -GNinja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ ninja
}
package() {
- cd "$_gitname/build"
- make INSTALL_ROOT="$pkgdir" install
- install -Dm755 app/antimony "$pkgdir/usr/bin/antimony"
+ cd "$srcdir/${pkgname}"
+ DESTDIR=${pkgdir} ninja install
+
+ mkdir -p ${pkgdir}/usr/share/icons/hicolor/scalable
+ cp deploy/icon.svg ${pkgdir}/usr/share/icons/hicolor/scalable/antimony.svg
+
+ mkdir -p ${pkgdir}/usr/share/applications
+ cp ../antimony.desktop ${pkgdir}/usr/share/applications/antinomy.desktop
}
diff --git a/antimony.desktop b/antimony.desktop
new file mode 100644
index 000000000000..1413b05b9528
--- /dev/null
+++ b/antimony.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Antimony
+Comment=Tree-based Modeler
+GenericName=CAD Application
+Exec=/usr/bin/antimony %f
+Icon=/usr/share/icons/hicolor/scalable/antimony.svg
+Terminal=false
+Categories=Graphics;Science;Engineering;
+MimeType=application/x-extension-sb;application/x-antimony;
+StartupWMClass=antimony