summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhanghua0002021-09-02 17:13:56 +0800
committerzhanghua0002021-09-02 17:13:56 +0800
commit2b04710eb515edd4fcf80c704341f4062ce34b12 (patch)
tree89611d73e36620c61e76ccf6f03dc15db6905324
downloadaur-2b04710eb515edd4fcf80c704341f4062ce34b12.tar.gz
First Update
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--LICENSE14
-rw-r--r--PKGBUILD29
-rw-r--r--aria2.conf45
-rw-r--r--aria2@.service13
-rw-r--r--aria2cd.hook9
7 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ec09c5f129ab
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = aria2cd
+ pkgdesc = A systemd Service to start aria2 automatically.
+ pkgver = 1.0
+ pkgrel = 1
+ url = https://aur.archlinux.org/aria2cd.git
+ arch = any
+ license = custom:WTFPL
+ depends = aria2
+ depends = systemd
+ source = aria2cd.hook
+ source = aria2.conf
+ source = aria2@.service
+ source = LICENSE::http://www.wtfpl.net/txt/copying
+ sha256sums = 6e3d3c83152f39c852a7d16e194acff33c5ae85f8dafdc36b783d5016973cdaa
+ sha256sums = d9277aed18e522fcd07c612cfbc49702eba92eeb87ea3b8861c8cd48ef18e09f
+ sha256sums = c863595990e32eb41aa76fd55d151acb04cee401fcf219d4e418b96fdc1468b2
+ sha256sums = 0356258391e190dc1d44ea01565cfe627fe44e27dad693a0a54c2483a7b223e5
+
+pkgname = aria2cd
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..6283c78d9481
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg
+src
+*.pkg.tar.zst
+keys
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..ee7d6a54e914
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,14 @@
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..41e78f4495cd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer ZhangHua<zhanghua.00@qq.com>
+
+pkgname=aria2cd
+pkgver=1.0
+pkgrel=1
+pkgdesc="A systemd Service to start aria2 automatically."
+arch=(any)
+url="https://aur.archlinux.org/aria2cd.git"
+license=(custom:WTFPL)
+depends=(aria2 systemd)
+source=(
+ ${pkgname}.hook
+ aria2.conf
+ aria2@.service
+ LICENSE::http://www.wtfpl.net/txt/copying
+)
+sha256sums=('6e3d3c83152f39c852a7d16e194acff33c5ae85f8dafdc36b783d5016973cdaa'
+ 'd9277aed18e522fcd07c612cfbc49702eba92eeb87ea3b8861c8cd48ef18e09f'
+ 'c863595990e32eb41aa76fd55d151acb04cee401fcf219d4e418b96fdc1468b2'
+ '0356258391e190dc1d44ea01565cfe627fe44e27dad693a0a54c2483a7b223e5')
+package(){
+ install -Dm644 ${srcdir}/aria2.conf ${pkgdir}/usr/share/aria2/aria2.conf
+ touch ${pkgdir}/usr/share/aria2/dht.dat
+ touch ${pkgdir}/usr/share/aria2/dht6.dat
+ touch ${pkgdir}/usr/share/aria2/aria2.session
+ install -Dm644 ${srcdir}/aria2@.service ${pkgdir}/usr/lib/systemd/system/aria2@.service
+ install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licences/${pkgname}/LICENSE
+ install -Dm644 ${srcdir}/${pkgname}.hook ${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook
+}
diff --git a/aria2.conf b/aria2.conf
new file mode 100644
index 000000000000..6a9b422a4ac9
--- /dev/null
+++ b/aria2.conf
@@ -0,0 +1,45 @@
+# Aria2 Config
+## Download Directory
+dir=${HOME}/下载
+## Max Download Numbers
+max-concurrent-downloads=8
+## Check Integrity
+check-integrity=true
+## Auto Continue
+continue=true
+## Max Connections Per Server
+max-connection-per-server=16
+## Retry Wait
+retry-wait=5
+## Accept gzip Headers
+http-accept-gzip=true
+## BT Force Encryption
+#bt-force-encryption=true
+## BT Save Torrent
+bt-save-metadata=true
+## Enable RPC
+enable-rpc=true
+## RPC Certificate
+#rpc-certificate=${HOME}/.aria2/aria2.crt
+## RPC Private Key
+#rpc-private-key=${HOME}/.aria2/aria2.key
+## RPC Listen Port
+#rpc-listen-port=6800
+## RPC Secret
+rpc-secret=SeCRetoFArIa@C
+## RPC Secure
+#rpc-secure=true
+## Daemon
+daemon=true
+## Enable Map Files Into Memory
+enable-mmap=true
+## File Allocation
+file-allocation=falloc
+## Paramiterized URI
+parameterized-uri=true
+## Save Session
+save-session=${HOME}/.aria2/aria2.session
+## Input File
+input-file=${HOME}/.aria2/aria2.session
+## BT Trackers
+#bt-tracker=
diff --git a/aria2@.service b/aria2@.service
new file mode 100644
index 000000000000..584779f987cb
--- /dev/null
+++ b/aria2@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Aria2c Daemon
+Requires=network.target
+After=network-online.target
+
+[Service]
+Type=forking
+User=%i
+ExecStart=/usr/bin/aria2c --daemon=true
+ExecReload=/usr/bin/kill -HUP ${MAINPID}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/aria2cd.hook b/aria2cd.hook
new file mode 100644
index 000000000000..936af625eb24
--- /dev/null
+++ b/aria2cd.hook
@@ -0,0 +1,9 @@
+[Trigger]
+Operation = Install
+Type = Package
+Target = aria2cd
+
+[Action]
+Description = Warning user about manyally operations...
+When = PostTransaction
+Exec = /usr/bin/sh -c 'echo "You need to copy /usr/share/aria2/ to \${HOME}/.aria2/ or aria2c will not work correctly.";echo "\${HOME} is the home directory of the user who runs aria2c"'