чување 8526814c7bfd479bfa34540b6485c89335fb1d4f
родитељ 3e1a16ada54dde2f91ee9fd134da0f8cbdb5821f
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Tue, 2 Aug 2022 22:24:15 +0200
Add mkfiles location; filter only first found package dir
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 6, додавања: 7(+), брисања: 4(-)
diff --git a/lib/defaults.mk b/lib/defaults.mk
@@ -9,6 +9,7 @@ DOCDIR= /share/doc/$PKG
LEGALDIR= /share/legal/$PKG
PKGDIR= /pkg
SRCBASEDIR= /src
+PKGMKFILES= $SRCBASEDIR/mkfiles
PKGDB= $PKGDIR/pkgdb.tsv
SUCKS= $DESTDIR/sucks
diff --git a/lib/install.mk b/lib/install.mk
@@ -1,7 +1,7 @@
<$mkpklib/defaults.mk
install-package:QV:
- pkg=$(find "${PKGDIR}" -name "${PKGBASE}-*.tar.xz")
+ pkg=$(find "${PKGDIR}" -name "${PKGBASE}-*.tar.xz" | sed 1q)
if [ -z "${pkg}" ]; then
printf "Cannot find package %s\n" "${PKGBASE}" >&2
exit 1
diff --git a/lib/listfiles.mk b/lib/listfiles.mk
@@ -1,7 +1,7 @@
<$mkpklib/defaults.mk
listfiles:QV:
- pkg=$(find "$PKGDIR" -name "$PKGBASE-*.tar.xz")
+ pkg=$(find "$PKGDIR" -name "$PKGBASE-*.tar.xz" | sed 1q)
if [ -z "${pkg}" ]; then
printf "Cannot find package %s" "$PKGBASE" >&2
else
diff --git a/lib/uninstall.mk b/lib/uninstall.mk
@@ -1,7 +1,7 @@
<$mkpklib/defaults.mk
uninstall-package:QV:
- pkg=$(find "${PKGDIR}" -name "${PKGBASE}-*.tar.xz")
+ pkg=$(find "${PKGDIR}" -name "${PKGBASE}-*.tar.xz" | sed 1q)
if [ -z "${pkg}" ]; then
printf "Cannot find package %s\n" "${PKGBASE}" >&2
exit 1
diff --git a/lib/vars.mk b/lib/vars.mk
@@ -5,3 +5,4 @@ output:QV:
printf "%s=\"%s\"\n" LEGALDIR "$LEGALDIR"
printf "%s=\"%s\"\n" PKGDIR "$PKGDIR"
printf "%s=\"%s\"\n" SRCBASEDIR "$SRCBASEDIR"
+ printf "%s=\"%s\"\n" PKGMKFILES "$PKGMKFILES"
diff --git a/mkpk b/mkpk
@@ -26,8 +26,9 @@ build()
if [ -z "${found}" ]; then
error "Directory %s does not exist (try fetch?)" "${package}"
fi
+ cp -R "${PKGMKFILES}/${package}"/* "${found}/"
cd "${found}"
- mk package-install
+ "${MK}" package-install
}
list()