makedeb


mpm 3.7.1-1


Fully-featured reference MPR helper

Click here to go back to the commit logs for mpm.

Commit:


Hash: 292ea86f8c734a92c4c504dd98de193a1945915a

Message: Updated version to 3.1.0

Diff


diff --git a/.SRCINFO b/.SRCINFO
index c8a9076..f7be06a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,14 @@
 pkgbase = mpm
-	pkgver = 0
+	pkgdesc = makedeb package manager
+	pkgver = 3.1.0
 	pkgrel = 1
+	url = https://github.com/hwittenborn/mpm
 	arch = any
+	depends = jq
+	depends = curl
+	depends = apt
+	options = emptydirs
+	source = mpm-3.1.0.tar.gz::https://github.com/hwittenborn/mpm/archive/refs/tags/v3.1.0.tar.gz
+	sha256sums = SKIP
 
 pkgname = mpm
diff --git a/PKGBUILD b/PKGBUILD
index af879b0..06bdcb6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,34 @@
 pkgname=mpm
-pkgver=0
+pkgver=3.1.0
 pkgrel=1
-arch=(any)
+pkgdesc="makedeb package manager"
+arch=('any')
+depends=('jq' 'curl' 'apt')
+url="https://github.com/hwittenborn/mpm"
+options=('emptydirs')
+
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('SKIP')
+
+package() {
+    mkdir -p "${pkgdir}/usr/bin/"
+
+    echo '#!/usr/bin/env bash' > "${pkgdir}/usr/bin/mpm"
+
+    # Copy mpm functions and entrypoint into mpm file
+    cd "${pkgname}-${pkgver}"
+    for i in $(find "src/functions" -type f); do
+        cat "${i}" >> "${pkgdir}/usr/bin/mpm"
+    done
+    cat "src/mpm.sh" >> "${pkgdir}/usr/bin/mpm"
+
+    chmod 555 "${pkgdir}/usr/bin/mpm"
+
+    # Remove testing commands
+    sed -i 's|.*# REMOVE AT PACKAGING||g' "${pkgdir}/usr/bin/mpm"
+
+    # Package repository stuff
+    mkdir -p "${pkgdir}/var/lib/mpm/"
+    touch "${pkgdir}/var/lib/mpm/packages.db"
+    chmod 444 "${pkgdir}/var/lib/mpm/packages.db"
+}