switch to using package scripts instead of makefiles

This commit is contained in:
hippoz 2021-07-01 18:18:02 +03:00
parent 79d6b7881b
commit 21c5eeab32

14
spkg
View file

@ -12,7 +12,10 @@ removepkg() {
pkgname=$1
prefix=$2
cd /usr/src/"${pkgname}" || exit 2
make uninstall
{
source ./PACKAGE
"pkg_uninstall" "${prefix}"
}
sed "s/${pkgname} $(${pkgname} --version)//" "${prefix}"/var/cache/spkg.cache
}
instpkg() {
@ -21,13 +24,14 @@ instpkg() {
mkdir -p "${tmpdir}"/spkg/work/"${1}"-work/
cd "${tmpdir}"/spkg/work/"${1}"-work/ || exit 2
mkdir -p "${prefix}"/usr/src/"${pkgname}"
wget "${prefix}"/usr/src/"${pkgname}" "${source}"/"${pkgname}"/Makefile
wget "${prefix}"/usr/src/"${pkgname}" "${source}"/"${pkgname}"/PACKAGE
cd "${prefix}"/usr/src/"${pkgname}" || exit 2
export PREFIX="${prefix}"
export PKGNAME="${pkgname}"
make prepare
make
make install
{
source ./PACKAGE
"pkg_install" "${prefix}"
}
sed a\ "${pkgname} $(${pkgname} --version)" "${prefix}"/var/cache/spkg.cache > "${prefix}"/var/cache/spkg.cache
}
update() {