From 2a63b861e1b79df90f5ed61a18ad6ca23feb5550 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 28 Aug 2020 16:25:57 +0200 Subject: [PATCH] Fixed buildrpm to contain packager --- Makefile | 14 +++++++------- buildrpm | 16 +++++++++++----- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 49c79d35..9aca1eb3 100644 --- a/Makefile +++ b/Makefile @@ -26,13 +26,13 @@ SRVDIR = $(ROOT)/usr/lib/systemd/system USE_SSL = 1 # flag for Kerberos support, please turn off if you don't need Kerberos -USE_KRB5 = 1 +USE_KRB5 = 0 # flag for LDAP support, please turn off if you don't need LDAP -USE_LDAP = 1 +USE_LDAP = 0 # flag for PAM support, please turn of if you don't need PAM -USE_PAM = 1 +USE_PAM = 0 ############################################################# @@ -90,28 +90,28 @@ CC = gcc endif ifdef USE_SSL -ifneq ($(USE_SSL),0) +ifeq ($(USE_SSL),1) override CFLAGS += -DHAVE_SSL LIBS += -lssl endif endif ifdef USE_KRB5 -ifneq ($(USE_KRB5),0) +ifeq ($(USE_KRB5),1) override CFLAGS += -DHAVE_KRB5 LIBS += -lkrb5 endif endif ifdef USE_LDAP -ifneq ($(USE_LDAP),0) +ifeq ($(USE_LDAP),1) override CFLAGS += -DHAVE_LDAP LIBS += -lldap endif endif ifdef USE_PAM -ifneq ($(USE_PAM),0) +ifeq ($(USE_PAM),1) override CFLAGS += -DHAVE_PAM LIBS += -lpam -llber endif diff --git a/buildrpm b/buildrpm index b0d9837a..71adbffb 100755 --- a/buildrpm +++ b/buildrpm @@ -1,4 +1,4 @@ -#!/bin/csh -v +#!/bin/csh -x # Build ELOG distribution if ($#argv < 2) then @@ -30,9 +30,9 @@ foreach argument ($argv) endsw end -if (`hostname` == 'elog01.psi.ch') then +#if (`hostname` == 'elog01.psi.ch') then set BUILDOPTS="$BUILDOPTS --with ldap --with pam --with ssl --with krb5" -endif +#endif set dist = `rpm --eval %{\?dist}` set dir = /tmp/elog-$version-$release @@ -117,7 +117,7 @@ if (`hostname` == 'elog01.psi.ch') then cp -vf doc/ChangeLog ~ritt/html/elog/download/ChangeLog endif # define Factory Packager - #set BUILDOPTS="${BUILDOPTS} --define \"packager Stefan Ritt \"" + # set BUILDOPTS="${BUILDOPTS} --define "\""packager Stefan Ritt "\""" endif rm -f /tmp/$archive @@ -127,8 +127,14 @@ rm -f ~/rpmbuild/SRPMS/elog*${version}-${release}*.rpm # building RPMs echo Build RPMs... -rpmbuild -ba ${BUILDOPTS} --define "factorydate ${fdate}" \ +if (`hostname` == 'elog01.psi.ch') then + rpmbuild -ba ${BUILDOPTS} --define "factorydate ${fdate}" \ + --define "elogver ${version}" --define "elogrel ${release}" \ + --define "packager Stefan Ritt " elog.spec || exit $? +else + rpmbuild -ba ${BUILDOPTS} --define "factorydate ${fdate}" \ --define "elogver ${version}" --define "elogrel ${release}" elog.spec || exit $? +endif # if running on at PSI copy to download area if (`hostname` == 'elog01.psi.ch') then