1 # Build recipe for libevent.
3 # Copyright 2018 Mateus P. Rodrigues <mprodrigues@dragora.org>.
4 # Copyright 2018 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.
19 version=246f44041e0782f728fa5ff2d39113005a1ab02d
24 # Set 'outdir' for a nice and well-organized output directory
25 outdir="${outdir}/${arch}/libs"
27 tarname=${program}-${version}.tar.lz
31 http://rsync.dragora.org/current/sources/$tarname
32 http://csphy.blue/dragora/mirror/current/sources/$tarname
36 An event notification library.
38 The libevent API provides a mechanism to execute a callback function
39 when a specific event occurs on a file descriptor or after a timeout
40 has been reached. Furthermore, libevent also support callbacks due
41 to signals or regular timeouts.
44 homepage=http://libevent.org/
45 license="3-clause BSD"
47 # Source documentation
48 docs="ChangeLog* LICENSE"
49 docsdir="${docdir}/${program}-${pkgversion}"
55 unpack "${tardir}/$tarname"
59 # Set sane permissions
60 chmod -R u+w,go-w,a+rX-s .
64 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
66 --libdir=/usr/lib${libSuffix} \
68 --build="$(cc -dumpmachine)"
71 make -j${jobs} DESTDIR="$destdir" install
73 # Strip remaining binaries and libraries
74 find "$destdir" -type f | xargs file | \
75 awk '/ELF/ && /executable/ || /shared object/' | \
76 cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
78 find "$destdir" -type f | xargs file | awk '/current ar archive/' | \
79 cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null || true
82 mkdir -p "${destdir}${docsdir}"
83 cp -p $docs "${destdir}${docsdir}"