print/libpaper/libpaper.sh

Fri, 15 Nov 2019 20:11:00 +0100

author
David Demelier <markand@malikania.fr>
date
Fri, 15 Nov 2019 20:11:00 +0100
changeset 1210
422313c3fcbd
parent 1115
297b5eef115e
child 1216
6710613b88b9
permissions
-rw-r--r--

text/rarian: initial import, closes #2311

1115
297b5eef115e vanilla: change shebangs to /bin/sh
David Demelier <markand@malikania.fr>
parents: 1081
diff changeset
1 #!/bin/sh
1081
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 PKGNAME=libpaper
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PKGVERSION=1.1.24+nmu5
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGREVISION=1
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGLICENSE="GPLv20"
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGSUMMARY="library for handling paper characteristics"
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 PKGDOWNLOAD="http://ftp.de.debian.org/debian/pool/main/libp/$PKGNAME/${PKGNAME}_$PKGVERSION.tar.gz"
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
24
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 : ${CHOST:=$(uname -m)-linux-musl}
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 : ${CBUILD:=$(uname -m)-linux-musl}
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 : ${CC:=clang}
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 : ${CFLAGS:=-O2}
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 : ${LDFLAGS:=}
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 : ${LIBS:=}
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
31
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 build()
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 {
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 rm -rf $PKGNAME-$PKGVERSION
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 tar xvf ${PKGNAME}_$PKGVERSION.tar.gz
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 cd $PKGNAME-$PKGVERSION
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
37
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 autoreconf -vif
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 CC="$CC" \
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 CFLAGS="$CFLAGS" \
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 LDFLAGS="$LDFLAGS" \
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 LIBS="$LIBS" \
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 ./configure \
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 --build=$CBUILD \
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 --host=$CHOST \
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 --prefix= \
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 --sbindir=/bin
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 make
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 make install DESTDIR=$DESTDIR
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 find $DESTDIR -type f -name "*.la" -delete
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
51
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
52 cd ..
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
53 rm -rf $PKGNAME-$PKGVERSION
cf4a6be4a30f print/libpaper: initial import, closes #2283
David Demelier <markand@malikania.fr>
parents:
diff changeset
54 }

mercurial