CHEATSHEET.md: include genisoimage to bootstrap under Debian
[dragora.git] / testing / gcr / recipe
blobcf406b1d49c9e67bb4d7345d223706f796432e2d
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.
17 program=gcr
18 version=3.28.0
19 release=1
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/x-libs"
24 tarname=${program}-${version}.tar.xz
26 # Remote source(s)
27 fetch=http://ftp.acc.umu.se/pub/gnome/sources/gcr/3.28/$tarname
29 description="
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
41 license=LGPLv2+
43 docs="AUTHORS COPYING ChangeLog HACKING NEWS README"
44 docsdir="${docdir}/${program}-${version}"
46 build()
48     set -e
49     unpack "${tardir}/$tarname"
51     cd "$srcdir"
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" \
61      $configure_args \
62      --libdir=/usr/lib${libSuffix} \
63      --mandir=$mandir \
64      --infodir=$infodir \
65      --enable-static=no \
66      --enable-shared=yes \
67      --enable-debug=no \
68      --enable-introspection=yes \
69      --enable-vala=yes \
70      --disable-schemas-compile \
71      --disable-update-mime \
72      --disable-update-icon-cache \
73      --build="$(cc -dumpmachine)"
75     make -j${jobs} V=1
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"
80     then
81         rm -f "${destdir}/${infodir}/dir"
82         lzip -9 "${destdir}/${infodir}"/*
83     fi
85     # Compress and link man pages (if needed)
86     if test -d "${destdir}/$mandir"
87     then
88         (
89             cd "${destdir}/$mandir"
90             find . -type f -exec lzip -9 '{}' +
91             find . -type l | while read -r file
92             do
93                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
94                 rm -- "$file"
95             done
96         )
97     fi
99     # Copy documentation
100     mkdir -p "${destdir}${docsdir}"
101     cp -p $docs "${destdir}${docsdir}"