1 # Build recipe for the berkeley-db.
3 # Copyright (c) 2017-2019 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 # Define a category for the output of the package name
26 tarname=${program}-${version}.tar.gz
30 http://rsync.dragora.org/current/sources/$tarname
31 http://mirror.cedia.org.ec/dragora/current/sources/$tarname
32 http://download.oracle.com/berkeley-db/$tarname
36 Berkeley database library.
38 Berkeley DB is a programmatic toolkit that provides embedded database
39 support for client/server applications.
42 homepage=http://www.oracle.com/database/berkeley-db/index.html
45 # Source documentation
47 docsdir="${docdir}/${program}-${version}"
53 unpack "${tardir}/$tarname"
57 # Set sane permissions
58 chmod -R u+w,go-w,a+rX-s .
61 ../dist/configure CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
62 LDFLAGS="$QILDFLAGS" \
64 --libdir=/usr/lib${libSuffix} \
69 --build="$(cc -dumpmachine)"
72 make -j${jobs} DESTDIR="$destdir" install
74 # Huge size for the package
75 rm -rf "${destdir}/usr/docs"
77 # Strip remaining binaries and libraries
78 find "$destdir" -type f | xargs file | \
79 awk '/ELF/ && /executable/ || /shared object/' | \
80 cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
82 find "$destdir" -type f | xargs file | awk '/current ar archive/' | \
83 cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null || true
88 mkdir -p "${destdir}${docsdir}"
89 cp -p $docs "${destdir}${docsdir}"