-
Notifications
You must be signed in to change notification settings - Fork 1
/
crest.spec
44 lines (37 loc) · 1.54 KB
/
crest.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
%define __jar_repack 0
Name: crest
Version: %{version}
Release: %{release}
Summary: CREST REST application
Group: Development/Tools
License: ATLAS
BuildArch: noarch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
A REST service access to COOL DB
%pre
getent group crest >/dev/null || groupadd -r crest
getent passwd crest >/dev/null || \
useradd -r -g crest -m -d /home/crest -s /sbin/nologin \
-c "Service account to run CREST application" crest
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local/share/crest
cp -p %{_sourcedir}/coolR-web/build/libs/crest.war $RPM_BUILD_ROOT/usr/local/share/crest
cp -p %{_sourcedir}/config/application.properties $RPM_BUILD_ROOT/usr/local/share/crest
cp -p %{_sourcedir}/crest.service $RPM_BUILD_ROOT/usr/local/share/crest
cp -p %{_sourcedir}/entrypoint.sh $RPM_BUILD_ROOT/usr/local/share/crest
cp -p %{_sourcedir}/logback.xml.crest $RPM_BUILD_ROOT/usr/local/share/crest/logback.xml
cp -p %{_sourcedir}/javaopts.properties.rpm $RPM_BUILD_ROOT/usr/local/share/crest/javaopts.properties
mkdir -p $RPM_BUILD_ROOT/usr/local/share/crest/data/dump
mkdir -p $RPM_BUILD_ROOT/usr/local/share/crest/data/web
%post
cp -p $RPM_BUILD_ROOT/usr/local/share/crest/crest.service /etc/systemd/system/.
##start crest service
systemctl restart crest
%files
%attr(755,crest,crest) /usr/local/share/crest
%attr(644,crest,crest) /usr/local/share/crest/application.properties
%changelog
* Sat Nov 7 2020 Andrea Formica 1.0.0
- Initial rpm release