recipes: Rename 'pkghashtag' variable to 'pkgcategory'
[dragora.git] / recipes / x-apps / scrot / recipe
blob94a0d0eae75ba4229f5124505106727309035c75
1 # Build recipe for scrot.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 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.
18 program=scrot
19 version=0.8
20 release=1
22 # Define a category for the output of the package name
23 pkgcategory=x-apps
25 tarname=${program}-${version}.tar.gz
27 # Remote source(s)
28 fetch=http://github.com/dreamer/scrot/archive/$tarname
30 description="
31 Command line screen capture util.
33 scrot is a command-line screen capture util like \"import\", but using
34 imlib2.  It has lots of options for autogenerating filenames, and can
35 do fun stuff like taking screenshots of multiple displays and glueing
36 them together.
39 homepage=http://github.com/dreamer/scrot
40 license=BSD
42 # Source documentation
43 docs="AUTHORS COPYING ChangeLog README TODO"
44 docsdir="${docdir}/${program}-${version}"
46 # Custom source directory
47 srcdir="${program}-${program}-${version}"
49 build()
51     set -e
53     unpack "${tardir}/$tarname"
55     cd "$srcdir"
57     # Refresh scrot using patches from Debian, plus an update
58     # from Dragora adding a missing header to getopt.c
59     for file in "${worktree}"/patches/scrot/??*.patch
60     do
61         patch -Np1 < "$file"
62     done
63     unset file
65     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
66      $configure_args \
67      --mandir=$mandir \
68      --build="$(cc -dumpmachine)"
70     make -j${jobs} V=1
71     make -j${jobs} DESTDIR="$destdir" install
73     lzip -9 "${destdir}/${mandir}/man1/scrot.1"
75     # This is wrong
76     rm -rf "${destdir}/usr/doc"
78     # Copy documentation
79     mkdir -p "${destdir}${docsdir}"
80     cp -p $docs "${destdir}${docsdir}/"