Skip to content

Commit

Permalink
RPM build created and README updated
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisMedeirosBBD committed Mar 28, 2019
1 parent 97c7e85 commit 81e743e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
!NEWS
!README
!README.md

!rpmbuild/

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ $ export LDFLAGS="-L/usr/pgsql-10/lib/"
```

After the make install, the program will be copied to /usr/local/bin by default, but this place can be change during the configure script. For example:
After the make install, the program will be copied to /usr/bin by default, but this place can be change during the configure script. For example:

```
./configure --prefix=/tmp
./configure --prefix=/yourdirectory
```

### How to use the program
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AC_PREREQ([2.69])
AC_INIT([pg-password-generator], [1.0], [[email protected]])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS([config.h])
AC_PREFIX_DEFAULT([/usr/local])
AC_PREFIX_DEFAULT([/usr/bin])

AM_INIT_AUTOMAKE

Expand Down
37 changes: 37 additions & 0 deletions rpmbuild/SPECS/pg-password-generator.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Name: pg-password-generator
Version: 1.0
Release: 1%{?dist}
Summary: Simple password generator for Postgres >= 10 using SCRAM-SHA-256
License: GPL2
URL: https://github.com/DenisMedeirosBBD/PostgresSCRAM256PasswordGenerator/
Source0: https://github.com/DenisMedeirosBBD/PostgresSCRAM256PasswordGenerator/archive/%{version}.tar.gz

BuildRequires: gcc
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: postgresql10-devel

Requires: postgresql10-devel >= 10

%description
%{summary}

%prep
%setup -q -n PostgresSCRAM256PasswordGenerator-%{version}

%build
echo "Preparing building..."
export LIBPQ_CFLAGS="-I/usr/pgsql-10/include/"
export LIBPQ_LIBS="pq"
export CPPFLAGS="-I/usr/pgsql-10/include/"
export LDFLAGS="-L/usr/pgsql-10/lib/"
autoreconf -iv
./configure
%{make_build}
echo "Building completed sucessfully."

%install
%{make_install} PREFIX=%{_prefix}

%files
/usr/bin/pg-password-generator

0 comments on commit 81e743e

Please sign in to comment.