recipes: Rename 'pkghashtag' variable to 'pkgcategory'
[dragora.git] / recipes / libs / libevent / recipe
blob35ba48e39973e604a9b7a2be8d55bb363788d579
1 # Build recipe for libevent.
3 # Copyright 2018 Mateus P. Rodrigues <mprodrigues@dragora.org>.
4 # Copyright 2018-2019 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 program=libevent
19 version=2.1.11-stable
20 pkgversion=$(echo $version | cut -f 1 -d -)
21 release=1
23 # Define a category for the output of the package name
24 pkgcategory=libs
26 tarname=${program}-${version}.tar.gz
28 # Remote source(s)
29 fetch=http://github.com/libevent/libevent/releases/download/release-${pkgversion}-stable/$tarname
31 description="
32 An event notification library.
34 The libevent API provides a mechanism to execute a callback function
35 when a specific event occurs on a file descriptor or after a timeout
36 has been reached.  Furthermore, libevent also support callbacks due
37 to signals or regular timeouts.
40 homepage=http://libevent.org/
41 license="3-clause BSD"
43 # Source documentation
44 docs="ChangeLog* LICENSE"
45 docsdir="${docdir}/${program}-${pkgversion}"
47 build()
49     set -e
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     # Set sane permissions
56     chmod -R u+w,go-w,a+rX-s .
58     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
59      $configure_args \
60      --libdir=/usr/lib${libSuffix} \
61      --docdir=$docsdir \
62      --enable-gcc-hardening \
63      --build="$(cc -dumpmachine)"
65     make -j${jobs} V=1
66     make -j${jobs} DESTDIR="$destdir" install-strip
68     # Copy documentation
69     mkdir -p "${destdir}${docsdir}"
70     cp -p $docs "${destdir}${docsdir}"