Skip to content

Commit

Permalink
added aria2 download manager and web ui
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithDHedger committed May 13, 2017
1 parent 17171fe commit e46e3a1
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
59 changes: 59 additions & 0 deletions LFSPkgBuildScripts/net/aria2/aria2.LFSBuild
Original file line number Diff line number Diff line change
@@ -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}"
1 change: 1 addition & 0 deletions LFSPkgBuildScripts/net/aria2/info
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit e46e3a1

Please sign in to comment.