1 # Build recipe for gcr.
3 # Copyright (C) 2018 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 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/x-libs"
24 tarname=${program}-${version}.tar.xz
27 fetch=http://ftp.acc.umu.se/pub/gnome/sources/gcr/3.28/$tarname
30 A library for displaying certificates, crypto UI.
32 GCR is a library for displaying certificates, and crypto UI, accessing
33 key stores. It also provides the viewer for crypto files on the GNOME
34 desktop and also is used in the Xfce desktop.
36 GCK is a library for accessing PKCS#11 modules like smart cards, in a
37 (G)object oriented way.
40 homepage=http://www.gnome.org
43 docs="AUTHORS COPYING ChangeLog HACKING NEWS README"
44 docsdir="${docdir}/${program}-${version}"
49 unpack "${tardir}/$tarname"
53 # Set sane permissions
54 chmod -R u+w,go-w,a+rX-s .
56 # This command fixes a deprecated entry in the schema template
57 # (Thanks to "Beyond Linux From Scratch")
58 sed -i -r 's:"(/desktop):"/org/gnome\1:' schema/*.xml
60 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
62 --libdir=/usr/lib${libSuffix} \
68 --enable-introspection=yes \
70 --disable-schemas-compile \
71 --disable-update-mime \
72 --disable-update-icon-cache \
73 --build="$(cc -dumpmachine)"
76 make -j${jobs} V=1 DESTDIR="$destdir" install-strip
78 # Compress info documents deleting index file for the package
79 if test -d "${destdir}/$infodir"
81 rm -f "${destdir}/${infodir}/dir"
82 lzip -9 "${destdir}/${infodir}"/*
85 # Compress and link man pages (if needed)
86 if test -d "${destdir}/$mandir"
89 cd "${destdir}/$mandir"
90 find . -type f -exec lzip -9 '{}' +
91 find . -type l | while read -r file
93 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
100 mkdir -p "${destdir}${docsdir}"
101 cp -p $docs "${destdir}${docsdir}"