File: RPM.md

package info (click to toggle)
pgagroal 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 5,384 kB
  • sloc: ansic: 39,090; sh: 684; python: 272; makefile: 36; sql: 13
file content (38 lines) | stat: -rw-r--r-- 892 bytes parent folder | download
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
# pgagroal rpm

[**pgagroal**](https://github.com/pgagroal/pgagroal) can be built into a RPM for [Fedora](https://getfedora.org/) systems.

## Requirements

```sh
dnf install gcc rpm-build rpm-devel rpmlint make python bash coreutils diffutils patch rpmdevtools chrpath
```

## Setup RPM development

```sh
rpmdev-setuptree
```

## Create source package

```sh
git clone https://github.com/pgagroal/pgagroal.git
cd pgagroal
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make package_source
```

## Create RPM package

```sh
VERSION=$(grep -Po "Version:\s*\K(\d+\.\d+\.\d+)" ../pgagroal.spec)
cp pgagroal-$VERSION.tar.gz ~/rpmbuild/SOURCES
cd ..
cp pgagroal.spec ~/rpmbuild/SPECS  # Copy spec to standard RPM location
QA_RPATHS=0x0001 rpmbuild -bb ~/rpmbuild/SPECS/pgagroal.spec
```

The resulting RPM will be located in `~/rpmbuild/RPMS/x86_64/`, if your architecture is `x86_64`.