summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammadreza Abdollahzadeh2022-01-12 10:20:32 +0330
committerMohammadreza Abdollahzadeh2022-01-12 10:20:32 +0330
commitc22dc636a60dfe375a0a3dcba0795ba48f7193c8 (patch)
tree63e5674ee3ea570bd278f688b05546a90e74d03d
downloadaur-c22dc636a60dfe375a0a3dcba0795ba48f7193c8.tar.gz
initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD31
-rw-r--r--tomee-sysusers.conf2
-rw-r--r--tomee-tmpfiles.conf2
-rw-r--r--tomee.install18
-rw-r--r--tomee.service19
6 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f71defe31f29
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = tomee
+ pkgdesc = Apache TomEE application server.
+ pkgver = 9.0.0_M7
+ pkgrel = 1
+ url = https://tomee.apache.org/
+ install = tomee.install
+ arch = any
+ license = Apache
+ depends = java-environment>=8
+ options = !strip
+ source = https://dlcdn.apache.org/tomee/tomee-9.0.0-M7/apache-tomee-9.0.0-M7-plume.tar.gz
+ source = tomee.service
+ source = tomee-sysusers.conf
+ source = tomee-tmpfiles.conf
+ sha256sums = fa13338cddea7c4c0061fbb03f87c6deba93187d4da176eb68e812657d279a68
+ sha256sums = f647a600b1a49dc9981fc6e820c260ca09e044a9dca5a421b5441b7acabebf38
+ sha256sums = d86cd28fb7c26b684eb94d8dff22d95dbe53b9e73dd2df38dfe8a75c31251875
+ sha256sums = 499a574b00d279741e0578e0413af5edbe336f1f9fff6f12cdb58acaef35313f
+
+pkgname = tomee
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..502ff42a458e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Mohammadreza Abdollahzadeh <morealaz at gmail dot com>
+pkgname=tomee
+pkgver=9.0.0_M7
+pkgrel=1
+pkgdesc="Apache TomEE application server."
+url="https://tomee.apache.org/"
+license=("Apache")
+depends=('java-environment>=8')
+arch=("any")
+options=(!strip)
+install="${pkgname}.install"
+source=("https://dlcdn.apache.org/${pkgname}/${pkgname}-${pkgver//_/-}/apache-${pkgname}-${pkgver//_/-}-plume.tar.gz"
+ "${pkgname}.service"
+ "${pkgname}-sysusers.conf"
+ "${pkgname}-tmpfiles.conf")
+
+sha256sums=('fa13338cddea7c4c0061fbb03f87c6deba93187d4da176eb68e812657d279a68'
+ 'f647a600b1a49dc9981fc6e820c260ca09e044a9dca5a421b5441b7acabebf38'
+ 'd86cd28fb7c26b684eb94d8dff22d95dbe53b9e73dd2df38dfe8a75c31251875'
+ '499a574b00d279741e0578e0413af5edbe336f1f9fff6f12cdb58acaef35313f')
+
+package() {
+ rm -f "apache-${pkgname}-plume-${pkgver//_/-}/bin/"*.{bat,exe}
+ install -d "${pkgdir}/opt"
+ cp -r "apache-${pkgname}-plume-${pkgver//_/-}" "${pkgdir}/opt/${pkgname}"
+ install -D -t "${pkgdir}/usr/lib/systemd/system/" -m 644 "${pkgname}.service"
+ install -D -m 644 "${pkgname}-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+ install -D -m 644 "${pkgname}-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+ chmod -R u=rwX,g=rwX,o=rX "${pkgdir}/opt/${pkgname}"
+}
+# vim:set ts=4 sw=4 et:
diff --git a/tomee-sysusers.conf b/tomee-sysusers.conf
new file mode 100644
index 000000000000..ced4e9dcee80
--- /dev/null
+++ b/tomee-sysusers.conf
@@ -0,0 +1,2 @@
+#Type Name ID GECOS Home directory Shell
+u tomee - "Apache TomEE Application Server" /opt/tomee -
diff --git a/tomee-tmpfiles.conf b/tomee-tmpfiles.conf
new file mode 100644
index 000000000000..223ad144a0f7
--- /dev/null
+++ b/tomee-tmpfiles.conf
@@ -0,0 +1,2 @@
+#Type Path Mode User Group Age Argument
+Z /opt/tomee - tomee tomee - -
diff --git a/tomee.install b/tomee.install
new file mode 100644
index 000000000000..ceac15675220
--- /dev/null
+++ b/tomee.install
@@ -0,0 +1,18 @@
+pre_upgrade() {
+ echo " -> Stoping tomee.service ..."
+ systemctl stop tomee.service
+ wait
+}
+
+post_upgrade() {
+ echo " -> Updating installation directory permissions ..."
+ chmod -R u=rwX,g=rwX,o=rX opt/tomee
+}
+
+pre_remove() {
+ echo " -> Stoping tomee.service ..."
+ systemctl stop tomee.service
+ wait
+ echo " -> Disabling tomee.service ..."
+ systemctl disable tomee.service
+}
diff --git a/tomee.service b/tomee.service
new file mode 100644
index 000000000000..71cc066ed98b
--- /dev/null
+++ b/tomee.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Apache TomEE Application Server
+After=network.target
+
+[Service]
+User=tomee
+Type=forking
+Environment=JAVA_HOME=/usr/lib/jvm/default-runtime
+Environment=CATALINA_PID=/opt/tomee/temp/tomee.pid
+Environment=CATALINA_HOME=/opt/tomee
+Environment=CATALINA_BASE=/opt/tomee
+Environment=CATALINA_OPTS='-server'
+Environment=JAVA_OPTS='-Djava.awt.headless=true'
+ExecStart=/opt/tomee/bin/startup.sh
+ExecStop=/opt/tomee/bin/shutdown.sh
+KillSignal=SIGCONT
+
+[Install]
+WantedBy=multi-user.target