summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRichard Neumann2020-02-10 18:44:10 +0100
committerRichard Neumann2020-02-10 18:44:10 +0100
commit109806167da824275ce29dbcb29eb72b4d80b565 (patch)
tree00d3a60861f08528cbc214729ad3b1fd24fac23c /PKGBUILD
parentf3a924564b9c5dc9b5060e16a9d12963536ab78e (diff)
downloadaur-109806167da824275ce29dbcb29eb72b4d80b565.tar.gz
Updated package layout.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD65
1 files changed, 46 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b96f2a858cb..80b411e01c3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,8 @@
pkgname='omada-controller'
pkgver=3.2.6
-pkgrel=2
+_scriptsver=1.1.2
+pkgrel=3
pkgdesc='Centralized EAP controller software'
arch=('x86_64')
url='https://www.tp-link.com/support/download/eap-controller/#Controller_Software'
@@ -11,40 +12,66 @@ depends=('jre8-openjdk' 'java-jsvc' 'net-tools')
provides=('eap-controller')
source=(
"https://static.tp-link.com/2020/202001/20200116/Omada_Controller_v${pkgver}_linux_x64.tar.gz"
- "${pkgname}.conf"
- "${pkgname}.hook"
- "${pkgname}.service"
+ "${pkgname}-scripts-${_scriptsver}.tar.gz::https://github.com/conqp/omada-controller-scripts/archive/${_scriptsver}.tar.gz"
)
sha256sums=(
'bf1fda3e1d882fa15bf8909cb4f2ede5561e5e47d7b02e422524136781aa8b12'
- '529a29bf0caf410380b27a180460078195c3cdb3dfd8df48ac1003538144f353'
- 'b7cccd06087df2e52815ea3f00b2edf7ab302e362d78edaa61222321fdb41726'
- 'e790fa28f2946a97cd62590d569d9baf0960755535b92deb7945b6c07ad148b3'
+ '1444c2fa29cd68c0acd3464ad0d51dbdd1645da515e79a84ede706f04c82db6e'
)
package() {
# Install required source files.
cd "${srcdir}/Omada_Controller_v3.2.6_linux_x64"
- local BASEDIR="${pkgdir}/var/lib/omada-controller"
+ local BASEDIR="${pkgdir}/opt/omada-controller"
install -dm 755 "${BASEDIR}"
- for dir in data keystore lib properties webapps; do
- cp -a "${dir}" "${BASEDIR}/"
+ # Install custom mongodb binary.
+ install -dm 755 "${BASEDIR}/bin"
+ install -m 755 "bin/mongod" "${BASEDIR}/bin/"
+
+ # Install JAR libraries.
+ install -dm 755 "${BASEDIR}/lib"
+
+ for file in lib/*; do
+ install -m 644 "${file}" "${BASEDIR}/lib/"
+ done
+
+ # Install keystore.
+ install -dm 755 "${BASEDIR}/keystore"
+
+ for file in keystore/*; do
+ install -m 644 "${file}" "${BASEDIR}/keystore/"
+ done
+
+ # Install *.properties config files.
+ install -dm 755 "${BASEDIR}/properties"
+
+ for file in properties/*; do
+ install -m 644 "${file}" "${BASEDIR}/properties/"
+ done
+
+ # Install web applications.
+ install -dm 755 "${BASEDIR}/webapps"
+
+ for file in webapps/*; do
+ install -m 644 "${file}" "${BASEDIR}/webapps/"
done
- # Install custom MongoDB binary.
- install -Dm 755 bin/mongod "${BASEDIR}/bin/mongod"
+ ### Install scripts ####
# Install systemd units.
- install -d -m 755 ${pkgdir}/usr/lib/systemd/system
- install -m 644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/"
+ cd "${srcdir}/omada-controller-scripts-${_scriptsver}"
+ install -dm 755 "${pkgdir}/usr/lib/systemd/system"
+ install -m 644 omada-controller.service "${pkgdir}/usr/lib/systemd/system/"
# Install sysusers configuration.
- install -d -m 755 "${pkgdir}/usr/lib/sysusers.d"
- install -m 644 "${srcdir}/${pkgname}.conf" "${pkgdir}/usr/lib/sysusers.d/"
+ install -dm 755 "${pkgdir}/usr/lib/sysusers.d"
+ install -m 644 "omada-controller.conf" "${pkgdir}/usr/lib/sysusers.d/"
- # Install ALPM hooks.
- install -d -m 755 "${pkgdir}/usr/share/libalpm/hooks"
- install -m 644 "${srcdir}/${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks/zz-${pkgname}.hook"
+ # Install ALPM hook and script.
+ install -dm 755 "${pkgdir}/usr/share/libalpm/hooks"
+ install -m 644 omada-init-user-dirs.hook "${pkgdir}/usr/share/libalpm/hooks/"
+ install -dm 755 "${pkgdir}/usr/share/libalpm/scripts"
+ install -m 755 omada-init-user-dirs.sh "${pkgdir}/usr/share/libalpm/scripts/omada-init-user-dirs"
}