summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2019-06-01 20:09:14 +0000
committerDaniel Bermond2019-06-01 20:10:27 +0000
commit60901ca6300c745e9151c4304b39665c925523ed (patch)
treec7838df23377a34ece74192f5939a412241a700f
parent123d7dc15fa6957d6c3f4a1ef021f442f8e04c3e (diff)
downloadaur-60901ca6300c745e9151c4304b39665c925523ed.tar.gz
Use patch to fix install. Add tests. Cosmetic changes.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD72
-rw-r--r--trio-fix-install.patch12
3 files changed, 53 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b09dfc7d63c7..67b35ee5fb67 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,14 @@
-# Generated by mksrcinfo v8
-# Sun Feb 26 23:20:58 UTC 2017
pkgbase = trio
pkgdesc = Portable string functions, focus on the *printf() and *scanf() clones
pkgver = 1.16
- pkgrel = 1
+ pkgrel = 2
url = https://sourceforge.net/projects/ctrio/
- arch = i686
arch = x86_64
license = custom
- provides = libtrio.so
source = http://downloads.sourceforge.net/project/ctrio/trio/trio-1.16.tar.gz
+ source = trio-fix-install.patch
sha256sums = 84d0e74f5b25f0b6c7d9b264ef41f98908e65a5056d4e75c5ef0e05d6a69fc0a
+ sha256sums = 727d780675109717b967ba4449861f573b3d43f56af97a59ca5ab08af38a99b4
pkgname = trio
diff --git a/PKGBUILD b/PKGBUILD
index dee21541519f..33e22928f548 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,48 @@
-# Maintainer: Daniel Bermond < yahoo-com: danielbermond >
+# Maintainer: Daniel Bermond < gmail-com: danielbermond >
pkgname=trio
pkgver=1.16
-pkgrel=1
-pkgdesc="Portable string functions, focus on the *printf() and *scanf() clones"
-arch=('i686' 'x86_64')
-url="https://sourceforge.net/projects/ctrio/"
+pkgrel=2
+pkgdesc='Portable string functions, focus on the *printf() and *scanf() clones'
+arch=('x86_64')
+url='https://sourceforge.net/projects/ctrio/'
license=('custom')
-provides=('libtrio.so')
-source=("http://downloads.sourceforge.net/project/ctrio/${pkgname}/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('84d0e74f5b25f0b6c7d9b264ef41f98908e65a5056d4e75c5ef0e05d6a69fc0a')
+source=("http://downloads.sourceforge.net/project/ctrio/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'trio-fix-install.patch')
+sha256sums=('84d0e74f5b25f0b6c7d9b264ef41f98908e65a5056d4e75c5ef0e05d6a69fc0a'
+ '727d780675109717b967ba4449861f573b3d43f56af97a59ca5ab08af38a99b4')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/trio-fix-install.patch"
+}
build() {
- cd "$pkgname"-"$pkgver"
- ./autogen.sh
- ./configure --prefix=/usr
-
- # add correct installation directories to Makefile
- sed -i '21iDESTDIR = ' Makefile
- sed -i '25s/\${prefix}/\${DESTDIR}\/\${prefix}/' Makefile
- sed -i '26s/\${prefix}\/include/\${DESTDIR}\/\${prefix}\/include/' Makefile
-
- make
+ cd "${pkgname}-${pkgver}"
+
+ ./configure --prefix='/usr'
+
+ make
+}
+
+check () {
+ cd "${pkgname}-${pkgver}"
+
+ make test
}
package() {
- cd "$pkgname"-"$pkgver"
- make DESTDIR="$pkgdir/" install
- install -D -m644 README "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
- # get library major, minor and micro version numbers
- local _major_ver="$(printf libtrio.so.*.*.* | sed 's/libtrio\.so\.//;s/\.[0-9]*\.[0-9]*$//')"
- local _minor_ver="$(printf libtrio.so.*.*.* | sed 's/libtrio\.so\.//;s/^[0-9]*\.//;s/\.[0-9]*$//')"
- local _micro_ver="$(printf libtrio.so.*.*.* | sed 's/libtrio\.so\.//;s/^[0-9]*\.[0-9]*\.//')"
-
- # create missing library symbolic links
- ln -sf "libtrio.so.${_major_ver}.${_minor_ver}.${_micro_ver}" "libtrio.so.${_major_ver}"
- ln -sf "libtrio.so.${_major_ver}.${_minor_ver}.${_micro_ver}" "libtrio.so"
-
- # copy missing library symbolic links to installation directory
- cp -a "libtrio.so.${_major_ver}" "${pkgdir}/usr/lib"
- cp -a "libtrio.so" "${pkgdir}/usr/lib"
+ cd "${pkgname}-${pkgver}"
+
+ make DESTDIR="$pkgdir" install
+
+ install -D -m644 README "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # create missing library symbolic links
+ cd "${pkgdir}/usr/lib"
+ local _libmajor
+ _libmajor="$(printf libtrio.so.*.*.* | sed 's/libtrio\.so\.//;s/\.[0-9]*\.[0-9]*$//')"
+ ln -s "libtrio.so.${_libmajor}".*.* "libtrio.so.${_libmajor}"
+ ln -s "libtrio.so.${_libmajor}".*.* libtrio.so
}
diff --git a/trio-fix-install.patch b/trio-fix-install.patch
new file mode 100644
index 000000000000..42b76a15e569
--- /dev/null
+++ b/trio-fix-install.patch
@@ -0,0 +1,12 @@
+diff -Naurp a/Makefile.in b/Makefile.in
+--- a/Makefile.in 2013-09-18 12:48:43.000000000 +0000
++++ b/Makefile.in 2019-06-01 19:45:56.000000000 +0000
+@@ -20,7 +20,7 @@ VPATH = @srcdir@
+ # Installation settings
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+-prefix = @prefix@
++prefix = $(DESTDIR)@prefix@
+ exec_prefix = @exec_prefix@
+ includedir = @includedir@
+ libdir = @libdir@