1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- # Build recipe for the berkeley-db.
- #
- # Copyright (c) 2017-2019 Matias Fonzo, <selk@dragora.org>.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- program=db
- version=6.2.38
- release=1
- # Set 'outdir' for a nice and well-organized output directory
- outdir="${outdir}/${arch}/db"
- pkgname=berkeley-db
- tarname=${program}-${version}.tar.gz
- # Remote source(s)
- fetch="
- http://rsync.dragora.org/current/sources/$tarname
- http://mirror.cedia.org.ec/dragora/current/sources/$tarname
- http://download.oracle.com/berkeley-db/$tarname
- "
- description="
- Berkeley database library.
- Berkeley DB is a programmatic toolkit that provides embedded database
- support for client/server applications.
- "
- homepage=http://www.oracle.com/database/berkeley-db/index.html
- license=Custom
- # Source documentation
- docs="README LICENSE"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- set -e
- unpack "${tardir}/$tarname"
- cd "$srcdir"
- # Set sane permissions
- chmod -R u+w,go-w,a+rX-s .
- cd build_unix
- ../dist/configure CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
- LDFLAGS="$QILDFLAGS" \
- $configure_args \
- --libdir=/usr/lib${libSuffix} \
- --enable-compat185 \
- --enable-dbm \
- --enable-cxx \
- --enable-stl \
- --build="$(cc -dumpmachine)"
- make -j${jobs} V=1
- make -j${jobs} DESTDIR="$destdir" install
- # Huge size for the package
- rm -rf "${destdir}/usr/docs"
- # Strip remaining binaries and libraries
- find "$destdir" -type f | xargs file | \
- awk '/ELF/ && /executable/ || /shared object/' | \
- cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find "$destdir" -type f | xargs file | awk '/current ar archive/' | \
- cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null || true
- cd ..
- # Copy documentation
- mkdir -p "${destdir}${docsdir}"
- cp -p $docs "${destdir}${docsdir}"
- }
|