Subject: [alpine-aports] [PATCH 2/2] community/mmc-utils: new aport

From: Olliver Schinagl <[email-masked]>
Date: Fri, 22 Feb 2019 16:56:02 +0100

Signed-off-by: Olliver Schinagl <[email-masked]>
---
 community/mmc-utils/APKBUILD | 60 ++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 community/mmc-utils/APKBUILD

diff --git a/community/mmc-utils/APKBUILD b/community/mmc-utils/APKBUILD
new file mode 100644
index 0000000000..5dd797d0d3
--- /dev/null
+++ b/community/mmc-utils/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Olliver Schinagl <[email-masked]>
+# Maintainer: Olliver Schinagl <[email-masked]>
+pkgname=mmc-utils
+pkgver=0_git20190221
+pkgrel=0
+pkgdesc="Configure MMC storage devices from userspace."
+url="http://pyropus.ca/software/memtester/"
+arch="all"
+license="GPL-2.0"
+depends=""
+makedepends="linux-headers"
+options="!check" # No checks available
+subpackages="${pkgname}-doc"
+source="https://dev.alpinelinux.org/archive/mmc-utils/mmc-utils-${pkgver}.tar.gz"
+_giturl="https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git"
+builddir="${srcdir}/mmc-utils"
+
+build()
+{
+	cd "${builddir}"
+	make
+}
+
+snapshot()
+{
+	_pkgver="0_git$(date +%Y%m%d)"
+	abuild clean
+	abuild deps
+
+	mkdir -p "${srcdir}"
+	cd "${srcdir}"
+
+	msg "Grabbing the latest snapshot"
+	git clone --depth=1 -q "${_giturl}"
+
+	msg "Creating snapshot: ${pkgname}-${_pkgver}"
+	tar -czf "${pkgname}-${_pkgver}.tar.gz"	"mmc-utils"
+
+	ssh distfiles.alpinelinux.org \
+		"mkdir -p archive/${pkgname}/"
+	scp "${srcdir}/${pkgname}-${_pkgver}.tar.gz" \
+		"dev.alpinelinux.org:/archive/${pkgname}"
+
+	sed -i -e "s/^pkgver=.*/pkgver=${_pkgver}/" \
+		"${startdir}/APKBUILD"
+	sed -i -e "s/^pkgrel=.*/pkgrel=0/" \
+		"${startdir}/APKBUILD"
+
+	cd "${startdir}"
+	abuild checksum
+}
+
+package()
+{
+	cd "${builddir}"
+	make DESTDIR="${pkgdir}" prefix="/usr" install install-man
+	gzip -c "${builddir}/man/mmc.1" > "mmc.1.gz" && \
+		install -D -m 644 "mmc.1.gz" "${pkgdir}/usr/share/man/man1/mmc.1.gz"
+}
+
-- 
2.20.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Wed, 27 Feb 2019 08:24:34 +0100

On Fri, 22 Feb 2019 16:56:02 +0100

>  create mode 100644 community/mmc-utils/APKBUILD

New packages should always go to testing repo first.

-nc

---