-
Notifications
You must be signed in to change notification settings - Fork 2
/
wildfly-dist.spec
99 lines (73 loc) · 2.51 KB
/
wildfly-dist.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Name: wildfly-dist
Version: 9.0.0.Final
Release: 1%{?dist}
Summary: WildFly Application Server
Group: System Environment/Daemons
License: LGPL 2.1
URL: http://www.wildfly.org
Source: http://download.jboss.org/wildfly/%{version}/wildfly-%{version}.tar.gz
ExclusiveArch: x86_64 i686
ExclusiveOS: Linux
Requires(pre): shadow-utils
Requires: java >= 1.7.0
Requires: /etc/init.d/functions
Provides: wildfly
%undefine _missing_build_ids_terminate_build
%define __arch_install_post QA_SKIP_RPATHS=2 %{__arch_install_post}
%define __jar_repack 0
%description
WildFly Application Server packaged from the binary distribution.
%prep
%setup -q -n wildfly-%{version}
%install
mkdir -p %{buildroot}/opt/wildfly
cp -R . %{buildroot}/opt/wildfly
mkdir -p %{buildroot}/etc/init.d
ln -s /opt/wildfly/bin/init.d/wildfly-init-redhat.sh %{buildroot}/etc/init.d/wildfly
mkdir -p %{buildroot}/etc/default
cp bin/init.d/wildfly.conf %{buildroot}/etc/default/wildfly.conf
# The init script doesn't default the user and crashes. Might as well set the
# home dir since we know what it is.
sed -e 's/# JBOSS_HOME/JBOSS_HOME/' -i %{buildroot}/etc/default/wildfly.conf
sed -e 's/# JBOSS_USER/JBOSS_USER/' -i %{buildroot}/etc/default/wildfly.conf
mkdir -p %{buildroot}/var/log/wildfly
mkdir -p %{buildroot}/var/run/wildfly
%pre
getent group wildfly >/dev/null || groupadd -r wildfly
getent passwd wildfly >/dev/null || \
useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
%post
alternatives --install /etc/alternatives/wildfly wildfly /opt/wildfly 100
%postun
alternatives --remove wildfly /opt/wildfly
%files
%defattr(-,root,root,0755)
%files
%defattr(-,root,root,0755)
%config /etc/default/wildfly.conf
/etc/init.d/wildfly
%dir /opt/wildfly
/opt/wildfly/appclient
/opt/wildfly/bin
/opt/wildfly/domain
/opt/wildfly/jboss-modules.jar
/opt/wildfly/modules
%attr(-,wildfly,wildfly) /opt/wildfly/standalone
/opt/wildfly/welcome-content
%dir /var/log/wildfly
%dir /var/run/wildfly
%doc /opt/wildfly/copyright.txt
%doc /opt/wildfly/LICENSE.txt
%doc /opt/wildfly/README.txt
%doc /opt/wildfly/docs
%changelog
* Tue Jul 21 2015 Charles Simpson <[email protected]>
- bump to 9.0.0.Final
* Tue Jul 21 2015 Charles Simpson <[email protected]>
- bump to 8.2.0.Final
* Tue Jul 21 2015 Charles Simpson <[email protected]>
- eliminate split between wildfly-common and wildfly
- change location to /opt/wildfly (see bin/init.d/wildfly.conf for default)
- install init.d and configuration files
* Sun Jul 13 2014 Charles Simpson <[email protected]>
- initial creation