summaryrefslogtreecommitdiff
path: root/user/scrot
diff options
context:
space:
mode:
Diffstat (limited to 'user/scrot')
-rw-r--r--user/scrot/APKBUILD42
-rw-r--r--user/scrot/config.h29
-rw-r--r--user/scrot/docdir.patch51
3 files changed, 122 insertions, 0 deletions
diff --git a/user/scrot/APKBUILD b/user/scrot/APKBUILD
new file mode 100644
index 000000000..6e10c8a0c
--- /dev/null
+++ b/user/scrot/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Nathan <ndowens@artixlinux.org>
+# Maintainer: Zach van Rijn <me@zv.io>
+pkgname=scrot
+pkgver=1.7
+pkgrel=0
+pkgdesc="Simple command-line screenshot utility for X"
+options="!check" # No testsuite
+url="https://github.com/resurrecting-open-source-projects/scrot"
+arch="all"
+license="MIT"
+depends=""
+makedepends="giblib-dev imlib2-dev libx11-dev libxfixes-dev libxcomposite-dev
+ automake libtool autoconf autoconf-archive-dev bsd-compat-headers
+ sed"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/resurrecting-open-source-projects/scrot/archive/$pkgver/$pkgname-$pkgver.tar.gz
+ docdir.patch
+ config.h
+ "
+
+prepare() {
+ default_prepare
+ autoreconf -fiv
+}
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man
+ cp $srcdir/config.h src/scrot_config.h
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" docsdir=/usr/share/doc/scrot install
+}
+
+sha512sums="9f9a29b69e9c216bad7c6028fe0043b2729393a716dccc1389665cf1e9496a6f1d370b97a7c8432b31af7d69477b4fc1d41dffd4ca2a78a49bb98e908975612f scrot-1.7.tar.gz
+709d7dca5c6d8df7671a143b48817bd839d3ee8a97ed4128ce45345b2f91e0fe9e8b76f7d7233c2fe79bd1eafff8c3a0ed1272c65b4c583ebb0b3b5483bd34a9 docdir.patch
+95429feb7c107c5adeadf33b5a3e3ff9dc4fb95f0d58f92c6a8de27d776a07256fa9f1825896d569eb32beb77300f46995dcafd1359f305d22861eb5748de84a config.h"
diff --git a/user/scrot/config.h b/user/scrot/config.h
new file mode 100644
index 000000000..e048745b5
--- /dev/null
+++ b/user/scrot/config.h
@@ -0,0 +1,29 @@
+/* src/config.h. Generated from config.h.in by configure. */
+/* src/config.h.in. Generated from configure.ac by autoheader. */
+
+/* Name of package */
+#define SCROT_PACKAGE "scrot"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "https://github.com/resurrecting-open-source-projects/scrot/issues"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "scrot"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "scrot 1.4"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "scrot"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.4"
+
+/* Version number of package */
+#define SCROT_VERSION "1.4"
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
diff --git a/user/scrot/docdir.patch b/user/scrot/docdir.patch
new file mode 100644
index 000000000..b881802db
--- /dev/null
+++ b/user/scrot/docdir.patch
@@ -0,0 +1,51 @@
+From ee8121c65d1e6b84ef8a9fbc60a83734325b7fe2 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@cmpct.info>
+Date: Wed, 5 Jan 2022 13:47:34 +0000
+Subject: [PATCH] autotools: respect --docdir
+
+Before this patch with --docdir=/usr/share/doc/scrot-1.7-r1 (example downstream
+versioning for patches):
+
+>>> /usr/share/doc/scrot-1.7-r1/
+>>> /usr/share/doc/scrot-1.7-r1/README.md.bz2
+>>> /usr/share/doc/scrot-1.7-r1/ChangeLog.bz2
+>>> /usr/share/doc/scrot-1.7-r1/AUTHORS.bz2
+>>> /usr/share/doc/scrot/
+>>> /usr/share/doc/scrot/scrot.png
+>>> /usr/share/doc/scrot/README.md.bz2
+>>> /usr/share/doc/scrot/ChangeLog.bz2
+>>> /usr/share/doc/scrot/AUTHORS.bz2
+
+After:
+
+>>> /usr/share/doc/scrot-1.7-r1/scrot.png
+>>> /usr/share/doc/scrot-1.7-r1/README.md.bz2
+>>> /usr/share/doc/scrot-1.7-r1/ChangeLog.bz2
+>>> /usr/share/doc/scrot-1.7-r1/AUTHORS.bz2
+
+This avoids installing duplicate files & installs them to the
+same location but it's overridable by --docdir in ./configure which
+helps downstreams.
+
+Bug: https://bugs.gentoo.org/828928
+---
+ Makefile.am | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 64439a8..7d2789c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -34,10 +34,9 @@ MAINTAINERCLEANFILES = Makefile.in
+
+ man_MANS = man/scrot.1
+
+-docs_DATA = README.md AUTHORS ChangeLog doc/scrot.png
+-docsdir = $(prefix)/share/doc/scrot
++dist_doc_DATA = README.md AUTHORS ChangeLog doc/scrot.png
+
+-EXTRA_DIST = man/scrot.1 $(docs_DATA)
++EXTRA_DIST = $(man_MANS)
+
+ SUBDIRS = src
+