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.
20 pkgversion=$(echo $version | cut -f 1 -d -)
23 # Define a category for the output of the package name
26 tarname=${program}-${version}.tar.gz
29 fetch=http://github.com/libevent/libevent/releases/download/release-${pkgversion}-stable/$tarname
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}"
51 unpack "${tardir}/$tarname"
55 # Set sane permissions
56 chmod -R u+w,go-w,a+rX-s .
58 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
60 --libdir=/usr/lib${libSuffix} \
62 --enable-gcc-hardening \
63 --build="$(cc -dumpmachine)"
66 make -j${jobs} DESTDIR="$destdir" install-strip
69 mkdir -p "${destdir}${docsdir}"
70 cp -p $docs "${destdir}${docsdir}"