diff --git a/LFSPkgBuildScripts/net/aria2/aria2.LFSBuild b/LFSPkgBuildScripts/net/aria2/aria2.LFSBuild new file mode 100755 index 00000000..d33b6e81 --- /dev/null +++ b/LFSPkgBuildScripts/net/aria2/aria2.LFSBuild @@ -0,0 +1,59 @@ +#!/bin/bash -e + +. /usr/share/LFSPkg/LFSFunctions + +PKGNAME="aria2" +TARNAME="$PKGNAME" +VERSION="1.31.0" +BUILD=1 +SECTION="NET" +SUFFIX="LFSPKG" +TARBALL="${TARNAME}-${VERSION}.tar.xz" + +scriptLog "${PKGNAME}-${VERSION}" +gettar "https://github.com/${PKGNAME}/${PKGNAME}/releases/download/release-${VERSION}/${TARBALL}" $SECTION + +PKG="${OUTPUT}/${PKGNAME}" + +DOWHAT=${1:-"build"} +rm -rf "$PKG" || true +mkdir -p "$PKG" +tar -xvf "${SOURCEARCHIVES}/${SECTION}/${TARBALL}" + +pushd "${TARNAME}-${VERSION}" + CFLAGS="$LFSFLAGS" CXXFLAGS="$LFSFLAGS" ./configure ${CONFIGOPTIONS} + make $MAKEFLAGS||make|| exit 1 + make install DESTDIR=$PKG || exit 1 + mkdir -vp $PKG/etc/bash_completion.d + ln -sv /usr/share/doc/aria2/bash_completion/aria2c $PKG/etc/bash_completion.d + wget -c "https://github.com/ziahamza/webui-aria2/archive/master.zip" + unzip master.zip + cd webui-aria2-master + mkdir -vp $PKG/usr/share/doc/aria2/webiface||true + cp -rf css flags fonts js configuration.js favicon.ico index.html $PKG/usr/share/doc/aria2/webiface +popd + +checketc "$PKG" +packageclean "$PKG" + +cp ./preinstall ./postinstall ./info "$PKG" &>/dev/null || true +pushd "$PKG" + /usr/bin/lfspkg -n "$PKGNAME" -p "$VERSION" -d $SECTION -b $BUILD -s $SUFFIX -m +popd + +case $DOWHAT in + up*) + lfspkg "^${PKGNAME}-[0-9][0-9]*" "${OUTPUT}/${SECTION}/${PKGNAME}-${VERSION}-${BUILD}_${SECTION}_${SUFFIX}.tar.gz" -u + ;; + "install") + lfspkg "${OUTPUT}/${SECTION}/${PKGNAME}-${VERSION}-${BUILD}_${SECTION}_${SUFFIX}.tar.gz" -i + ;; + "build") + echo "Just built" + ;; + *) + echo "*** Unknown command ***" + exit 1 +esac + +rm -r "$PKG" "${TARNAME}-${VERSION}" diff --git a/LFSPkgBuildScripts/net/aria2/info b/LFSPkgBuildScripts/net/aria2/info new file mode 100644 index 00000000..39777b49 --- /dev/null +++ b/LFSPkgBuildScripts/net/aria2/info @@ -0,0 +1 @@ +aria2 (CLI Metalink/BiTorrent client) aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. Homepage: https://aria2.github.io/