RAISIN_MAKE: make command to run
SUDO: sudo command to run
DISTRO: which Linux distribution we are running on, Debian, Fedora, etc
+PKGTYPE: which package format is used by the distro, rpm, deb, etc
ARCH: which architecture we are running on, x86_64, arm32, etc.
BASEDIR: absolute path of the raisin directory
PREFIX: installation PREFIX
done
}
+function _build_package_deb() {
+ fakeroot bash ./scripts/mkdeb "$1"
+}
+
+function _build_package_rpm() {
+ ./scripts/mkrpm "$1"
+}
+
function build_package() {
- if [[ $DISTRO = "Debian" ]]
- then
- fakeroot bash ./scripts/mkdeb "$1"
- elif [[ $DISTRO = "Fedora" ]]
- then
- ./scripts/mkrpm "$1"
- else
- echo "Don't know how to create packages for $DISTRO"
- fi
+ _build_package_"$PKGTYPE" "$1"
}
function install_package() {