3 # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
4 # Version 2, December 2004
6 # Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
8 # Everyone is permitted to copy and distribute verbatim or modified
9 # copies of this license document, and changing it is allowed as long
10 # as the name is changed.
12 # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
13 # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
16 # 0. You just DO WHAT THE FUCK YOU WANT TO.
18 # SlackBuild script for aerc
19 # ===========================
20 # By: r1w1s1 (https://fosstodon.org/@r1w1s1)
22 # Descr: aerc is an email client that runs in your terminal
23 # URL: https://aerc-mail.org/
25 # v0.17.0: 29/june/2024 by r1w1s1 - Initial build.
26 # v0.18.0: 02/july/2024 by r1w1s1
28 cd $
(dirname $0) ; CWD
=$
(pwd)
31 VERSION
=${VERSION:-0.18.0}
37 PKG
=${TMP}/package-
${PRGNAM}
38 PKGTYPE
=${PKGTYPE:-tgz}
39 OUTPUT
=${OUTPUT:-/tmp}
41 # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
42 # the name of the created package would be, and then exit. This information
43 # could be useful to other scripts.
44 if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
45 echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
49 # Clean up any previous build artifacts
51 mkdir
-p "$TMP" "$PKG" "$OUTPUT"
54 # Download and extract the source code
55 rm -rf "${PRGNAM}-${VERSION}"
56 wget
-O "${PRGNAM}-${VERSION}.tar.gz" "https://git.sr.ht/~rjarry/aerc/archive/${VERSION}.tar.gz"
57 tar xvf
"${PRGNAM}-${VERSION}.tar.gz"
58 cd "${PRGNAM}-${VERSION}"
63 # Install the compiled binaries to the package directory
64 make install PREFIX
=/usr DESTDIR
="$PKG"
67 mkdir
-p "$PKG/usr/doc/${PRGNAM}-${VERSION}"
68 cp -a CHANGELOG.md CONTRIBUTING.md README.md LICENSE MAINTAINERS \
69 "$PKG/usr/doc/${PRGNAM}-${VERSION}"
71 # Compress man pages and fix symlinks
72 find "$PKG/usr/share/man" -type f
-exec gzip -9 {} \
;
73 for i
in $
(find "$PKG/usr/man" -type l
); do
74 ln -s "$(readlink "$i").gz" "$i.gz"
78 # Copy the SlackBuild script into the package documentation
79 cat "$CWD/${PRGNAM}.SlackBuild" > "$PKG/usr/doc/${PRGNAM}-${VERSION}/${PRGNAM}.SlackBuild"
81 # Copy the slack-desc file
82 mkdir
-p "$PKG/install"
83 cat "$CWD/slack-desc" > "$PKG/install/slack-desc"
87 /sbin
/makepkg
-l y
-c n
"$OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE}"
89 # Generate MD5 checksum
91 md5sum "${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE}" > "${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE}.md5"