mirror of
https://github.com/outbackdingo/scratchpkg.git
synced 2026-03-19 19:14:07 +00:00
updated
This commit is contained in:
22
buildpkg
22
buildpkg
@@ -544,9 +544,27 @@ main() {
|
||||
NO_ORPHAN_CHECK=yes
|
||||
fi
|
||||
|
||||
#### CHECK SPKGBUILD ###
|
||||
#if [ -z "$name" ] || [ -z "$version" ] || [ -z "$release" ] || [ "$(basename `pwd`)" != "$name" ] || [ "`type -t build`" != "function" ]; then
|
||||
#msgerr "Please check spkgbuild."
|
||||
#exit 1
|
||||
#fi
|
||||
|
||||
### CHECK SPKGBUILD ###
|
||||
if [ -z "$name" ] || [ -z "$version" ] || [ -z "$release" ] || [ "$(basename `pwd`)" != "$name" ] || [ "`type -t build`" != "function" ]; then
|
||||
msgerr "Please check spkgbuild."
|
||||
if [ -z "$name" ]; then
|
||||
msgerr "'name' is empty!"
|
||||
exit 1
|
||||
elif [ "$(basename `pwd`)" != "$name" ]; then
|
||||
msgerr "Port name and Directory name is different!"
|
||||
exit 1
|
||||
elif [ -z "$version" ]; then
|
||||
msgerr "'version' is empty!"
|
||||
exit 1
|
||||
elif [ -z "$release" ]; then
|
||||
msgerr "'release' is empty!"
|
||||
exit 1
|
||||
elif [ "`type -t build`" != "function" ]; then
|
||||
msgerr "'build' function not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -16,10 +16,9 @@ INDEX_DIR="/var/lib/scratchpkg/index"
|
||||
PACKAGE_DIR="/var/cache/scratchpkg/packages"
|
||||
SOURCE_DIR="/var/cache/scratchpkg/sources"
|
||||
WORK_DIR="/tmp"
|
||||
BACKUP_DIR="/var/cache/scratchpkg/backup"
|
||||
REJECTED_DIR="/var/cache/scratchpkg/rejected"
|
||||
LOG_DIR="/var/cache/scratchpkg/log"
|
||||
HOOK_DIR="/etc/hooks"
|
||||
PORT_DIR="/etc/ports"
|
||||
|
||||
OPTIONS=(!libtool emptydirs strip docs purge zipman buildflags makeflags)
|
||||
PURGE_FILES=(usr/{,share/}info/dir)
|
||||
@@ -91,73 +90,6 @@ checktool() {
|
||||
|
||||
}
|
||||
|
||||
updmimedb() {
|
||||
|
||||
# msg2 "Update mime database..."
|
||||
if [ -x /usr/bin/update-mime-database ]; then
|
||||
/usr/bin/update-mime-database /usr/share/mime
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
updiconcache() {
|
||||
|
||||
# ms2 "Update icon cache..."
|
||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
/usr/bin/gtk-update-icon-cache -qf /usr/share/icons/hicolor
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
updglibschemas() {
|
||||
|
||||
# msg2 "Update glib schemas..."
|
||||
if [ -x /usr/bin/glib-compile-schemas ]; then
|
||||
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
upddesktopdb() {
|
||||
|
||||
# msg2 "Update desktop database..."
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
updmandb() {
|
||||
|
||||
# msg2 "Update man database..."
|
||||
if [ -x /usr/bin/mandb ]; then
|
||||
/usr/bin/mandb -q
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
updlibdb() {
|
||||
|
||||
# msg2 "Running ldconfig..."
|
||||
if [ -x /sbin/ldconfig ]; then
|
||||
/sbin/ldconfig
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
updinfopages() {
|
||||
|
||||
pushd /usr/share/info
|
||||
if [ -f dir ]; then
|
||||
rm dir
|
||||
fi
|
||||
for f in *; do
|
||||
install-info $f dir 2>/dev/null
|
||||
done
|
||||
popd
|
||||
|
||||
}
|
||||
|
||||
getpkginfo() {
|
||||
|
||||
description=$(cat $BUILD_SCRIPT | grep ^'# description' | sed 's/\://' | cut -d ' ' -f 3-)
|
||||
|
||||
@@ -33,17 +33,13 @@ PORT_REPO+=(/usr/ports/wip)
|
||||
# PACKAGE_DIR="/var/cache/scratchpkg/packages"
|
||||
# SOURCE_DIR="/var/cache/scratchpkg/sources"
|
||||
# WORK_DIR="/tmp"
|
||||
# BACKUP_DIR="/var/cache/scratchpkg/backup"
|
||||
# REJECTED_DIR="/var/cache/scratchpkg/rejected"
|
||||
# LOG_DIR="/var/cache/scratchpkg/log"
|
||||
# HOOK_DIR="/etc/hooks"
|
||||
# PORT_DIR="/etc/ports"
|
||||
|
||||
##
|
||||
## GLOBAL PACKAGE OPTIONS
|
||||
##
|
||||
# -- These are default values for the options=() settings
|
||||
# -- add '!' in front of this option to disable it
|
||||
#
|
||||
# -- libtool: Keep libtool file (*.la) in packages
|
||||
# -- emptydirs: Keep empty directories in packages
|
||||
# -- strip: Strip symbols from binaries/libraries
|
||||
@@ -53,7 +49,10 @@ PORT_REPO+=(/usr/ports/wip)
|
||||
# -- buildflags: Enable buildflags (CFLAGS and CXXFLAGS)
|
||||
# -- makeflags: Enable makeflags (MAKEFLAGS)
|
||||
#
|
||||
# OPTIONS=(libtool emptydirs strip docs purge zipman buildflags makeflags)
|
||||
# -- These are default values for the options=() settings
|
||||
# -- add '!' in front of this option to disable it
|
||||
#
|
||||
# OPTIONS=(!libtool emptydirs strip docs purge zipman buildflags makeflags)
|
||||
|
||||
# -- Files to be removed from all packages (if purge is specified)
|
||||
# PURGE_FILES=(usr/{,share/}info/dir)
|
||||
|
||||
Reference in New Issue
Block a user