summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordpellegr2020-06-05 18:49:38 +0200
committerdpellegr2020-06-05 18:49:38 +0200
commit7527881c85ab75aa71c8959df938c8fbedeb2bd4 (patch)
tree09a93fe9becd6d99267aa9e22f616db278d38a45
downloadaur-7527881c85ab75aa71c8959df938c8fbedeb2bd4.tar.gz
initial
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD44
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..36b364daa194
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = cgal-git
+ pkgdesc = Computational Geometry Algorithms Library
+ pkgver = r91288.6b679968c6
+ pkgrel = 1
+ url = https://github.com/CGAL/cgal.git
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ makedepends = git
+ makedepends = cmake
+ makedepends = qt5-svg
+ makedepends = eigen
+ depends = mpfr
+ depends = gmp
+ provides = cgal
+ conflicts = cgal
+ source = git+https://github.com/CGAL/cgal.git
+ sha256sums = SKIP
+
+pkgname = cgal-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8a39ed113ac6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Dario Pellegrini <pellegrini.dario@gmail.com>
+
+pkgname=cgal-git
+_pkgname=cgal
+pkgver=r91288.6b679968c6
+pkgrel=1
+pkgdesc="Computational Geometry Algorithms Library"
+arch=('x86_64')
+url="https://github.com/CGAL/cgal.git"
+license=('GPL' 'LGPL')
+depends=('mpfr' 'gmp')
+makedepends=('git' 'cmake' 'qt5-svg' 'eigen')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+source=("git+https://github.com/CGAL/cgal.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ mkdir -p "$srcdir/$_pkgname/build"
+ cd "$srcdir/$_pkgname/build"
+ cmake ../ -DCGAL_HEADER_ONLY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib
+}
+
+build() {
+ # Just in case you turned OFF CGAL_HEADER_ONLY, otherwise nothing to do
+ cd "$srcdir/$_pkgname/build"
+ make -j$(nproc)
+}
+
+package () {
+ mkdir -p "$srcdir/$_pkgname/build"
+ cd "$srcdir/$_pkgname/build"
+ make install DESTDIR="$pkgdir"
+
+ # The tarball still has all these licenses included
+ for _license in "$srcdir/$_pkgname/Installation/LICENSE"{,.FREE_USE,.GPL,.LGPL,.BSL,.COMMERCIAL,.RFL}; do
+ install -D -m644 "$_license" "$pkgdir/usr/share/licenses/$pkgname/$_license"
+ done
+}