pkgname=redxen # Prefix pkgver="$(date +'%Y.%m.%d')" # Use current date as fallback url="https://git.redxen.eu/RedXen/aports" # Upstream for all configs arch="noarch" # Most things aren't arch specific license="none" # Can you even license configs? options="!check" # Usually software doesn't provide tests builddir="$srcdir" # This should be a default, sadly isn't _rx_pkgname="${startdir##*/}" # Usually the package name is the same as the directory _rx_installdir="/etc/redxen/$_rx_pkgname" # The install dir follows this pattern rx_replace() { sed -i -- "s/$1/$(printf "%s" "$2" | sed 's/[&/\]/\\&/g')/g" "$3" } rx_cpkgdir() { echo "${subpkgdir:-${pkgdir}}" } rx_install() { _SRC="$1" if [ ! -f "$_SRC" ]; then if [ -f "$pkgdir/$_SRC" ]; then _SRC="$pkgdir/$_SRC" elif [ -f "$builddir/$_SRC" ]; then _SRC="$builddir/$_SRC" elif [ -f "$srcdir/$_SRC" ]; then _SRC="$srcdir/$_SRC" else die "Install source $_SRC wasn't found" return 1 fi fi install -D -m "${_rx_fperm:-444}" -- "$_SRC" "$(rx_cpkgdir)/${_rx_installdir}/${2:-${1##*/}}" } # Defaults rx_source_installall() { for i in $source; do rx_install "$i" done } # Install every source file in a directory package() { rx_source_installall }