47 lines
1.4 KiB
Bash
47 lines
1.4 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=uthash
|
|
pkgver=2.1.0
|
|
_debver=2.1.0
|
|
_debrel=1
|
|
pkgrel=1
|
|
pkgdesc='C preprocessor implementations of a hash table and a linked list'
|
|
arch=('any')
|
|
url='https://troydhanson.github.io/uthash/'
|
|
license=('Simplified-BSD')
|
|
makedepends=('quilt')
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/troydhanson/$pkgname/archive/v$pkgver.tar.gz"
|
|
"https://deb.debian.org/debian/pool/main/u/uthash/uthash_$_debver-$_debrel.debian.tar.xz")
|
|
sha512sums=('c8005113a48ec7636715ecec0286a5d9086971a7267947aba9e0ad031b6113a4f38a1fb512d33d6fefb5891635fdd31169ce4d6ab04b938bda612ebbccb3eda0'
|
|
'e9e664f1bdf24a712161fba3d66f0966ddf37753f68363d916472d9e8f683db7a70be36d8182b31bdbd66bc0da9ddca496f11d269d691cabf00804691da7d4b7')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
quilt push -av
|
|
fi
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}/src"
|
|
|
|
# create directory for header files
|
|
install -dm755 "${pkgdir}"/usr/include/
|
|
|
|
# install header files in /usr/include
|
|
for h in *.h; do
|
|
install -m 644 ${h} "${pkgdir}"/usr/include/
|
|
done
|
|
|
|
# install license file
|
|
install -Dm644 ../LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
|
|
}
|