summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlberto Santini2018-08-12 20:02:15 +0200
committerAlberto Santini2018-08-12 20:02:15 +0200
commitfd3e132072ef053e21944bfb67b05b797e5abba0 (patch)
treeffbaa812058ca82a7342067ca209f3f2547bf9ff
downloadaur-fd3e132072ef053e21944bfb67b05b797e5abba0.tar.gz
Added aur package for Discorde
-rw-r--r--.SRCINFO13
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD47
3 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c411163c9f90
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = discorde
+ pkgdesc = C and C++ wrapper around Concorde API
+ pkgver = r11.349c753
+ pkgrel = 1
+ url = https://github.com/andremaravilha/discorde-tsp
+ arch = x86_64
+ license = MIT
+ depends = concorde
+ source = git+https://github.com/andremaravilha/discorde-tsp.git
+ sha256sums = SKIP
+
+pkgname = discorde
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..699cfadd6821
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.xz
+pkg/
+src/
+discorde-tsp/ \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..529b791d65f0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Mantainer: Alberto Santini <alberto dot santini at upf dot edu>
+
+pkgname='discorde'
+pkgdesc='C and C++ wrapper around Concorde API'
+
+pkgver=r11.349c753
+pkgrel=1
+arch=('x86_64')
+url='https://github.com/andremaravilha/discorde-tsp'
+license=('MIT')
+depends=('concorde')
+
+source=('git+https://github.com/andremaravilha/discorde-tsp.git')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/discorde-tsp"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+build() {
+ cd "$srcdir/discorde-tsp"
+
+ cd src/api/c
+ make all
+
+ cd ../cpp
+ make all
+}
+
+package() {
+ install -dm755 "$pkgdir/usr/include/discorde"
+ install -m644 "$srcdir/discorde-tsp/src/api/c/src/discorde_c.h" "$pkgdir/usr/include/discorde"
+ install -m644 "$srcdir/discorde-tsp/src/api/cpp/src/discorde_cpp.h" "$pkgdir/usr/include/discorde"
+
+ install -dm755 "$pkgdir/usr/lib"
+ install -m755 "$srcdir/discorde-tsp/src/api/c/dist/Release/"**/libdiscorde.a "$pkgdir/usr/lib/libdiscorde_c.a"
+ install -m755 "$srcdir/discorde-tsp/src/api/cpp/dist/Release/"**/libdiscorde_cpp.a "$pkgdir/usr/lib/libdiscorde_cpp.a"
+
+ install -dm755 "$pkgdir/usr/share/doc/discorde/examples"
+ install -m644 "$srcdir/discorde-tsp/README.md" "$pkgdir/usr/share/doc/discorde"
+ cp -R "$srcdir/discorde-tsp/examples/src"* "$pkgdir/usr/share/doc/discorde/examples"
+ chmod -R 644 "$pkgdir/usr/share/doc/discorde/examples"
+} \ No newline at end of file