Skip to content

Commit

Permalink
Updated rpmbuild spec file & README
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyen Van Nguyen <[email protected]>
  • Loading branch information
nguyennv committed Apr 21, 2023
1 parent dd3254b commit a0ff96e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ Copyright (C) 2020-present iWay Vietnam and/or its affiliates. All rights reserv
* JDK 11 or newer.
* Apache Maven 3.5 or newer for Maven build.
* Apache Ant 1.x for Ant build.
* rpmbuild for rpm package build.
* rpm-build for rpm package build.

### Setting up your build system
* On Fedora or CentOS 8.x or Red Hat EL 7.x
```shell
dnf -y install java-11-openjdk java-11-openjdk-devel maven ant git rpmbuild
dnf -y install java-11-openjdk java-11-openjdk-devel maven ant git make rpmdevtools rpm-build
```
* On CentOS 7.x or Red Hat EL 7.x
```shell
yum -y install java-11-openjdk java-11-openjdk-devel maven ant git rpmbuild
yum -y install java-11-openjdk java-11-openjdk-devel maven ant git make rpmdevtools rpm-build
```
* On Debian or Ubuntu
```shell
apt install -y openjdk-11-jdk maven ant git
apt install -y openjdk-11-jdk maven ant git make
```

### Clone code from git repository
Expand Down Expand Up @@ -75,7 +75,7 @@ Wrote: ~/rpmbuild/RPMS/noarch/zm-sso-1.0.0-1.el7.noarch.rpm
cd ~/projects/zimbra/zm-sso
ssh [email protected] "mkdir -p /opt/zimbra/lib/ext/zm-sso"
scp target/*.jar [email protected]:/opt/zimbra/lib/ext/zm-sso
scp target/dependencies/*.jar [email protected]:/opt/zimbra/jetty_base/common/lib
scp target/dependencies/*.jar [email protected]:/opt/zimbra/lib/ext-common
scp conf/zm.sso.properties [email protected]:/opt/zimbra/conf
```
* Restart mailbox to load the extension.
Expand Down
8 changes: 4 additions & 4 deletions rpms/zm-sso.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ mvn clean package

%install
mkdir -p $RPM_BUILD_ROOT/opt/zimbra/lib/ext/zm-sso
mkdir -p $RPM_BUILD_ROOT/opt/zimbra/jetty_base/common/lib
mkdir -p $RPM_BUILD_ROOT/opt/zimbra/lib/ext-common
mkdir -p $RPM_BUILD_ROOT/opt/zimbra/conf
cp -R target/*.jar $RPM_BUILD_ROOT/opt/zimbra/lib/ext/zm-sso
cp -R target/dependencies/*.jar $RPM_BUILD_ROOT/opt/zimbra/jetty_base/common/lib
cp -R target/dependencies/*.jar $RPM_BUILD_ROOT/opt/zimbra/lib/ext-common
cp -R conf/zm.sso.properties $RPM_BUILD_ROOT/opt/zimbra/conf

%posttrans
Expand All @@ -39,9 +39,9 @@ su - zimbra -c "zmprov fc all"

%files
/opt/zimbra/lib/ext/zm-sso/*.jar
/opt/zimbra/jetty_base/common/lib/*.jar
/opt/zimbra/lib/ext-common/*.jar
/opt/zimbra/conf/zm.sso.properties

%changelog
* Thu Apr 20 2021 Nguyen Van Nguyen <[email protected]> - 1.0.0-1
* Fri Apr 21 2021 Nguyen Van Nguyen <[email protected]> - 1.0.0-1
- Initial release 1.0.0.

0 comments on commit a0ff96e

Please sign in to comment.