Fixed buildrpm to contain packager

This commit is contained in:
Stefan Ritt 2020-08-28 16:25:57 +02:00
parent 3d7c366b84
commit 2a63b861e1
2 changed files with 18 additions and 12 deletions

View File

@ -26,13 +26,13 @@ SRVDIR = $(ROOT)/usr/lib/systemd/system
USE_SSL = 1 USE_SSL = 1
# flag for Kerberos support, please turn off if you don't need Kerberos # 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 # 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 # 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 endif
ifdef USE_SSL ifdef USE_SSL
ifneq ($(USE_SSL),0) ifeq ($(USE_SSL),1)
override CFLAGS += -DHAVE_SSL override CFLAGS += -DHAVE_SSL
LIBS += -lssl LIBS += -lssl
endif endif
endif endif
ifdef USE_KRB5 ifdef USE_KRB5
ifneq ($(USE_KRB5),0) ifeq ($(USE_KRB5),1)
override CFLAGS += -DHAVE_KRB5 override CFLAGS += -DHAVE_KRB5
LIBS += -lkrb5 LIBS += -lkrb5
endif endif
endif endif
ifdef USE_LDAP ifdef USE_LDAP
ifneq ($(USE_LDAP),0) ifeq ($(USE_LDAP),1)
override CFLAGS += -DHAVE_LDAP override CFLAGS += -DHAVE_LDAP
LIBS += -lldap LIBS += -lldap
endif endif
endif endif
ifdef USE_PAM ifdef USE_PAM
ifneq ($(USE_PAM),0) ifeq ($(USE_PAM),1)
override CFLAGS += -DHAVE_PAM override CFLAGS += -DHAVE_PAM
LIBS += -lpam -llber LIBS += -lpam -llber
endif endif

View File

@ -1,4 +1,4 @@
#!/bin/csh -v #!/bin/csh -x
# Build ELOG distribution # Build ELOG distribution
if ($#argv < 2) then if ($#argv < 2) then
@ -30,9 +30,9 @@ foreach argument ($argv)
endsw endsw
end end
if (`hostname` == 'elog01.psi.ch') then #if (`hostname` == 'elog01.psi.ch') then
set BUILDOPTS="$BUILDOPTS --with ldap --with pam --with ssl --with krb5" set BUILDOPTS="$BUILDOPTS --with ldap --with pam --with ssl --with krb5"
endif #endif
set dist = `rpm --eval %{\?dist}` set dist = `rpm --eval %{\?dist}`
set dir = /tmp/elog-$version-$release 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 cp -vf doc/ChangeLog ~ritt/html/elog/download/ChangeLog
endif endif
# define Factory Packager # define Factory Packager
#set BUILDOPTS="${BUILDOPTS} --define \"packager Stefan Ritt <stefan.ritt@psi.ch>\"" # set BUILDOPTS="${BUILDOPTS} --define "\""packager Stefan Ritt <stefan.ritt@psi.ch>"\"""
endif endif
rm -f /tmp/$archive rm -f /tmp/$archive
@ -127,8 +127,14 @@ rm -f ~/rpmbuild/SRPMS/elog*${version}-${release}*.rpm
# building RPMs # building RPMs
echo Build 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 <stefan.ritt@psi.ch>" elog.spec || exit $?
else
rpmbuild -ba ${BUILDOPTS} --define "factorydate ${fdate}" \
--define "elogver ${version}" --define "elogrel ${release}" elog.spec || exit $? --define "elogver ${version}" --define "elogrel ${release}" elog.spec || exit $?
endif
# if running on at PSI copy to download area # if running on at PSI copy to download area
if (`hostname` == 'elog01.psi.ch') then if (`hostname` == 'elog01.psi.ch') then