summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfansuregrin2022-07-04 16:48:36 +0800
committerfansuregrin2022-07-04 16:48:36 +0800
commit64796a3132b7e4d641101f1d3cfd2705938b92d6 (patch)
treed6ad5ffca4161ac00670bbc711f14a61ba187d96
parenteba35c3a426987412300f250d6f91180b8930290 (diff)
downloadaur-panindex.tar.gz
update to v3.0.8
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD53
-rw-r--r--PanIndex.service14
-rw-r--r--config.json11
4 files changed, 57 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c0f285b77f7a..f44b75e95eaa 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,16 @@
pkgbase = panindex
pkgdesc = Simple network-disk directory listing program
- pkgver = 2.0.9
- pkgrel = 1
+ pkgver = 3.0.8
+ pkgrel = 2
url = https://github.com/libsgh/PanIndex
arch = x86_64
license = AGPL-3.0
- source = https://github.com/libsgh/PanIndex/releases/download/v2.0.9/PanIndex-v2.0.9-linux-amd64.tar.gz
- sha256sums = f755c30b3a0b5b2537eb28a553edc83deb3d2cb97a9cb6ec5a8fef9c7bbe2209
+ options = !strip
+ source = https://github.com/libsgh/PanIndex/releases/download/v3.0.8/PanIndex-linux-amd64.tar.gz
+ source = PanIndex.service
+ source = config.json
+ sha256sums = 988feb98333690d834025dc30bb22e514eecd7f2abd0d9239db00f70329b9012
+ sha256sums = c87d28e8216a0e46be6e9cd6b56dc4556bfd52412268897d5b30028680f1981c
+ sha256sums = af014db474631d347bcf5a0a9b837de2fffe179dee085f540294a2de6dcacc3e
pkgname = panindex
diff --git a/PKGBUILD b/PKGBUILD
index 8f69780ee93e..979b7395dda3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,34 @@
# Maintainer: Fansure Grin <fansuregrin@outlook.com>
pkgname=panindex
_pkgname=PanIndex
-pkgver=2.0.9
-pkgrel=1
+pkgver=3.0.8
+pkgrel=2
pkgdesc="Simple network-disk directory listing program"
arch=('x86_64')
url="https://github.com/libsgh/PanIndex"
license=('AGPL-3.0')
-source=("${url}/releases/download/v${pkgver}/${_pkgname}-v${pkgver}-linux-amd64.tar.gz")
-sha256sums=('f755c30b3a0b5b2537eb28a553edc83deb3d2cb97a9cb6ec5a8fef9c7bbe2209')
+source=("${url}/releases/download/v${pkgver}/${_pkgname}-linux-amd64.tar.gz"
+ "${_pkgname}.service"
+ 'config.json')
+sha256sums=('988feb98333690d834025dc30bb22e514eecd7f2abd0d9239db00f70329b9012'
+ 'c87d28e8216a0e46be6e9cd6b56dc4556bfd52412268897d5b30028680f1981c'
+ 'af014db474631d347bcf5a0a9b837de2fffe179dee085f540294a2de6dcacc3e')
+options=(!strip)
package() {
cd ${srcdir}
- # license
- install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE
- # executable file
- install -Dm755 ${_pkgname} ${pkgdir}/usr/bin/${_pkgname}
- # service
- install -dm755 ${pkgdir}/etc/systemd/system
- touch ${pkgdir}/etc/systemd/system/${_pkgname}.service
- chmod 755 ${pkgdir}/etc/systemd/system/${_pkgname}.service
- echo '[Unit]
-Description=PanIndex Service
-Documentation=https://libsgh.github.io/PanIndex/
-After=network.target
-[Service]
-User=root
-WorkingDirectory=/etc/PanIndex
-ExecStart=/usr/bin/PanIndex
-Environment="PAN_INDEX_DATA_PATH=/etc/PanIndex"
-Restart=on-failure
-RestartPreventExitStatus=23
-LimitNPROC=10000
-LimitNOFILE=1000000
-[Install]
-WantedBy=multi-user.target
-' > ${pkgdir}/etc/systemd/system/${_pkgname}.service
- # config dir
- install -Ddm755 ${pkgdir}/etc/${_pkgname}
+
+ # install license file
+ install -vDm644 LICENSE ${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE
+
+ # install executable file
+ mv ${_pkgname}-linux-amd64 ${_pkgname}
+ install -vDm755 ${_pkgname} ${pkgdir}/usr/bin/${_pkgname}
+
+ # install systemd service file
+ install -vDm644 ${_pkgname}.service ${pkgdir}/usr/lib/systemd/system/${_pkgname}.service
+
+ # install config directory and config.json file
+ install -vdm755 ${pkgdir}/etc/${_pkgname}
+ install -vDm644 config.json ${pkgdir}/etc/${_pkgname}/config.json
}
diff --git a/PanIndex.service b/PanIndex.service
new file mode 100644
index 000000000000..6c57189368a9
--- /dev/null
+++ b/PanIndex.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=PanIndex Service
+Documentation=https://libsgh.github.io/PanIndex/
+After=network.target
+[Service]
+User=root
+WorkingDirectory=/etc/PanIndex
+ExecStart=/usr/bin/PanIndex -c=/etc/PanIndex/config.json
+Restart=on-failure
+RestartPreventExitStatus=23
+LimitNPROC=10000
+LimitNOFILE=1000000
+[Install]
+WantedBy=multi-user.target
diff --git a/config.json b/config.json
new file mode 100644
index 000000000000..ac26cbcb15b0
--- /dev/null
+++ b/config.json
@@ -0,0 +1,11 @@
+{
+ "host": "0.0.0.0",
+ "port": 5238,
+ "log_level": "info",
+ "data_path": "/etc/PanIndex/data",
+ "cert_file": "",
+ "key_file": "",
+ "config_query": "",
+ "db_type": "sqlite",
+ "dsn": "/etc/PanIndex/data/data.db"
+}