Skip to content

Commit

Permalink
Add package 'c-ares' to the set of ABS packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ezamlinsky committed Jul 13, 2019
1 parent 6647382 commit 9895d9a
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 0 deletions.
10 changes: 10 additions & 0 deletions c-ares/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
123 changes: 123 additions & 0 deletions c-ares/PKGBUILD
Original file line number Diff line number Diff line change
@@ -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 <ezamlinsky@gmail.com>

#==============================================================================#
# 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 #
################################################################################

0 comments on commit 9895d9a

Please sign in to comment.