switch to using package scripts instead of makefiles
This commit is contained in:
parent
79d6b7881b
commit
21c5eeab32
1 changed files with 9 additions and 5 deletions
14
spkg
14
spkg
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue