diff --git a/c-ares/LICENSE b/c-ares/LICENSE new file mode 100644 index 0000000..e3f5b64 --- /dev/null +++ b/c-ares/LICENSE @@ -0,0 +1,10 @@ +Copyright 1998 by the Massachusetts Institute of Technology. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and that +the name of M.I.T. not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. +M.I.T. makes no representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. diff --git a/c-ares/PKGBUILD b/c-ares/PKGBUILD new file mode 100644 index 0000000..d2f1bfc --- /dev/null +++ b/c-ares/PKGBUILD @@ -0,0 +1,123 @@ +################################################################################ +# Encoding: UTF-8 Tab size: 4 # +# # +# ARCH LINUX PACKAGE BUILD DESCRIPTION FILE # +# # +# Ordnung muss sein! Copyleft (Ɔ) 2019, Arch Linux # +################################################################################ +# Maintainer: Jack Black + +#==============================================================================# +# Package information # +#==============================================================================# +pkgname='c-ares' +pkgver=1.15.0 +pkgrel=1 +pkgdesc='C library that performs DNS requests and name resolves asynchronously' +url='https://c-ares.haxx.se/' +license=('custom') +arch=('x86_64') + +#==============================================================================# +# Package dependencies # +#==============================================================================# +depends=('glibc') + +#==============================================================================# +# Package sources and integrity # +#==============================================================================# +source=( + "https://c-ares.haxx.se/download/$pkgname-$pkgver.tar.gz" + "https://c-ares.haxx.se/download/$pkgname-$pkgver.tar.gz.asc" + 'LICENSE' +) +sha512sums=( + 'a1de6c5e7e1a6a13c926aae690e83d5caa51e7313d63da1cf2af6bc757c41d585aad5466bc3ba7b7f7793cb1748fa589f40972b196728851c8b059cfc8c3be50' + 'SKIP' + '55e8607392c5f82ed85e3580fa632dfdc2dcd0b1a5e918dc61d00532c15c11ecb709f6007b65805c1fbe8fcd21ee794c9e4a9638c97ac1f4960b2654010a4d0a' +) + +#==============================================================================# +# Package preparation sequence # +#==============================================================================# +prepare() { + + # Change directory to source directory + cd $pkgname-$pkgver + + # Run autogen script if exists + if [ -x autogen.sh ]; then + NOCONFIGURE=1 ./autogen.sh + fi +} + +#==============================================================================# +# Package building sequence # +#==============================================================================# +build() { + + # Change directory to source directory + cd $pkgname-$pkgver + + # Default configure options + config_opts=( + '--prefix=/usr' + '--bindir=/usr/bin' + '--sbindir=/usr/bin' + '--libdir=/usr/lib' + '--libexecdir=/usr/lib' + '--sysconfdir=/etc' + '--localstatedir=/var' + '--enable-silent-rules' + '--enable-shared' + '--disable-static' + '--disable-debug' + '--disable-curldebug' + '--enable-optimize=-O3' + '--enable-libgcc' + '--enable-nonblocking' + '--with-random' + ) + + # Run package configuration script + ./configure "${config_opts[@]}" + + # Set correct LDFLAGS to build a shared archive + if [ -f libtool ]; then + sed -e "s/ -shared / $LDFLAGS\0/g" -i libtool + fi + + # Build package + make +} + +#==============================================================================# +# Package self testing sequence # +#==============================================================================# +check() { + + # Change directory to source directory + cd $pkgname-$pkgver + + # Run internal checks + make -k check +} + +#==============================================================================# +# Package installation sequence # +#==============================================================================# +package() { + + # Change directory to source directory + cd $pkgname-$pkgver + + # Install files + make DESTDIR=$pkgdir install + + # Install license file + install -Dm644 $srcdir/LICENSE $pkgdir/usr/share/licenses/c-ares/LICENSE +} + +################################################################################ +# END OF FILE # +################################################################################