Applied RPM build patch from Laurent Jean-Rigaud
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/csh
|
||||
#Usage: build [-n] <version> <release>
|
||||
#Build ELOG distribution
|
||||
# Usage: build [-n] <version> <release>
|
||||
# Build ELOG distribution
|
||||
|
||||
if ($#argv < 2) then
|
||||
echo "Usage: build <version> <release>"
|
||||
@@ -12,8 +12,6 @@ set release = $argv[2]
|
||||
set dir = /tmp/elog-$version
|
||||
set archive = elog-$version-$release.tar.gz
|
||||
|
||||
perl -wapi.bak -e 's&^(Version:\s+).*$&${1}'"${version}"'&;s&^(Release:\s+).*$&${1}'"${release}"'&;' elog.spec
|
||||
|
||||
# create temporary directory
|
||||
rm -Rf $dir
|
||||
mkdir $dir
|
||||
@@ -68,19 +66,35 @@ rm -Rf $dir
|
||||
|
||||
# transfer archive
|
||||
echo Transfer archive...
|
||||
cp /tmp/$archive ~ritt/html/elog/download/tar/
|
||||
cp /tmp/$archive ~ritt/html/elog/download/tar/elog-latest.tar.gz
|
||||
cp /tmp/$archive ~/rpmbuild/SOURCES/elog-$version.tar.gz
|
||||
cd ~ritt/elog
|
||||
cp -f doc/ChangeLog ~ritt/html/elog/download/ChangeLog
|
||||
|
||||
# if running on at PSI copy to download area
|
||||
if ( -d /home/ritt ) then
|
||||
echo "Copy to download area"
|
||||
if ( -d ~ritt/html/elog/download/tar ) then
|
||||
cp /tmp/$archive ~ritt/html/elog/download/tar/
|
||||
cp /tmp/$archive ~ritt/html/elog/download/tar/elog-latest.tar.gz
|
||||
cd ~ritt/elog
|
||||
cp -f doc/ChangeLog ~ritt/html/elog/download/ChangeLog
|
||||
endif
|
||||
endif
|
||||
cd -
|
||||
rm -f /tmp/$archive
|
||||
|
||||
echo Cleanup $version-$release rpms
|
||||
rm -f ~/rpmbuild/RPMS/*/elog*${version}-${release}*.rpm
|
||||
rm -f ~/rpmbuild/SRPMS/elog*${version}-${release}*.rpm
|
||||
|
||||
# building RPMs
|
||||
echo Build RPMs...
|
||||
rm -f ~/rpmbuild/RPMS/x86_64/*
|
||||
rm -f ~/rpmbuild/SRPMS/*
|
||||
rpmbuild -ba elog.spec || exit $?
|
||||
cp ~/rpmbuild/RPMS/x86_64/elog*rpm ~ritt/html/elog/download/RPMS/
|
||||
cp ~/rpmbuild/RPMS/x86_64/elog-$version-$release.x86_64.rpm ~ritt/html/elog/download/RPMS/elog-latest.x86_64.rpm
|
||||
cp ~/rpmbuild/SRPMS/elog*rpm ~ritt/html/elog/download/SRPMS/
|
||||
cp ~/rpmbuild/SRPMS/elog-$version-$release.src.rpm ~ritt/html/elog/download/SRPMS/elog-latest.src.rpm
|
||||
echo Build RPMs..
|
||||
rpmbuild -ba --define "version ${version}" --define "release ${release}" elog.spec || exit $?
|
||||
|
||||
# if running on at PSI copy to download area
|
||||
if ( -d /home/ritt ) then
|
||||
if ( -d ~ritt/html/elog/download/tar ) then
|
||||
cp ~/rpmbuild/RPMS/x86_64/elog*rpm ~ritt/html/elog/download/RPMS/
|
||||
cp ~/rpmbuild/RPMS/x86_64/elog-$version-$release.x86_64.rpm ~ritt/html/elog/download/RPMS/elog-latest.x86_64.rpm
|
||||
cp ~/rpmbuild/SRPMS/elog*rpm ~ritt/html/elog/download/SRPMS/
|
||||
cp ~/rpmbuild/SRPMS/elog-$version-$release.src.rpm ~ritt/html/elog/download/SRPMS/elog-latest.src.rpm
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
# OpenSSH privilege separation requires a user & group ID
|
||||
# ELOG weblog application
|
||||
# rpmbuild -ba --define 'version 3.1.4' --define 'release 2' --define "date $(LC_TIME=En date '+%a %b %d %Y')" elog.spec
|
||||
|
||||
#define date $(LC_TIME=En date '+%a %b %d %Y')
|
||||
%define build_timestamp %(LC_TIME=En date '+%a %b %d %Y')
|
||||
|
||||
Name: elog
|
||||
Summary: elog is a standalone electronic web logbook
|
||||
Version: 3.1.4
|
||||
Release: 2
|
||||
Version: %version
|
||||
Release: %release%{?dist}
|
||||
License: GPL
|
||||
Group: Applications/Networking
|
||||
Source: http://elog.psi.ch/elog/download/elog-%{version}.tar.gz
|
||||
@@ -41,6 +45,8 @@ access control, etc. Moreover, a single server can host several weblogs, and
|
||||
each weblog can be totally different from the rest.
|
||||
|
||||
%changelog
|
||||
* %{build_timestamp} Stefan Ritt <stefan.ritt@psi.ch> %version-%release
|
||||
- Updated from git
|
||||
* Wed Sep 26 2018 Stefan Ritt <stefan.ritt@psi.ch>
|
||||
- Made adjustments for new elog server and RH7
|
||||
* Fri Aug 29 2014 Stefan Ritt <stefan.ritt@psi.ch>
|
||||
@@ -72,7 +78,7 @@ each weblog can be totally different from the rest.
|
||||
-g elog -M -r elog 2>/dev/null || :
|
||||
|
||||
%build
|
||||
make
|
||||
make CFLAGS='-O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -g'
|
||||
sed "s#\@PREFIX\@#%{prefix}#g" elogd.init_template > elogd.init
|
||||
|
||||
%install
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
# config: /usr/local/elog/elogd.cfg
|
||||
# pidfile: /var/run/elogd.pid
|
||||
|
||||
# RHEL
|
||||
[ -f /etc/init.d/functions ] && . /etc/init.d/functions
|
||||
|
||||
# Check for the config file
|
||||
if [ ! -f /usr/local/elog/elogd.cfg ]; then
|
||||
exit 0
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
# config: @PREFIX@/elog/elogd.cfg
|
||||
# pidfile: /var/run/elogd.pid
|
||||
|
||||
# RHEL
|
||||
[ -f /etc/init.d/functions ] && . /etc/init.d/functions
|
||||
|
||||
# Check for the config file
|
||||
if [ ! -f @PREFIX@/elog/elogd.cfg ]; then
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user