1 # Build recipe for alpine (suite).
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 # Define a category for the output of the package name
22 pkgcategory=networking
24 tarname=${program}-${version}.tar.xz
27 fetch=http://alpine.x10host.com/alpine/release/src/$tarname
29 homepage=http://alpine.x10host.com/
32 Alpine messaging system.
34 Alpine is an Alternatively Licensed Program for Internet News & Email,
35 is a tool for reading, sending, and managing electronic messages.
36 Alpine is the successor to Pine and was developed until 2008 by
37 Computing & Communications at the University of Washington. Though
38 originally designed for inexperienced email users, Alpine supports many
39 advanced features, and an ever-growing number of configuration and
40 personal-preference options.
42 Alpine is maintained by Eduardo Chappa at $homepage
45 license="Apache License version 2"
47 # Source documentation
48 docs="LICENSE NOTICE README VERSION"
49 docsdir="${docdir}/${program}-${version}"
55 unpack "${tardir}/$tarname"
59 # Set sane permissions
60 chmod -R u+w,go-w,a+rX-s .
63 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
65 --libdir=/usr/lib${libSuffix} \
68 --with-interactive-spellcheck=aspell \
72 make -j${jobs} DESTDIR="$destdir" install
74 # Make symlink to invoke alpine as "pine" :-)
75 ln -s alpine "${destdir}/usr/bin/pine"
77 # Include additional utilities
79 mkdir -p "${destdir}/usr/sbin"
80 cp -p imap/mlock/mlock "${destdir}/usr/sbin/"
81 chmod 2755 "${destdir}/usr/sbin/mlock"
82 strip --strip-unneeded "${destdir}/usr/sbin/mlock"
84 cp -p imap/mailutil/mailutil "${destdir}/usr/bin/"
85 chmod 755 "${destdir}/usr/bin/mailutil"
87 mkdir -p "${destdir}/${mandir}/man1"
88 cp -p imap/src/mailutil/mailutil.1 "${destdir}/${mandir}/man1/"
89 chmod 644 "${destdir}/${mandir}/man1/mailutil.1"
91 # Compress and link man pages (if needed)
92 if test -d "${destdir}/$mandir"
95 cd "${destdir}/$mandir"
96 find . -type f -exec lzip -9 '{}' +
97 find . -type l | while read -r file
99 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
106 mkdir -p "${destdir}${docsdir}"
107 cp -p $docs "${destdir}${docsdir}/"