Skip to content

Commit a5fa34e

Browse files
committed
Create an RPM
Add an RPM spec file. Make change to configure.ac and Makefiles as appropriate to facilitate building as an RPM.
1 parent b2a633a commit a5fa34e

File tree

6 files changed

+622
-18
lines changed

6 files changed

+622
-18
lines changed

Makefile.am

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## Process this file with automake to produce Makefile.in
22

33
SUBDIRS = etc lib portal kmtool sr \
4-
ca openid bin sbin ch man doc templates
4+
openid bin sbin ch man doc templates
5+
6+
AM_DISTCHECK_CONFIGURE_FLAGS = --with-apache-user=apache \
7+
--with-apache-group=apache

bin/Makefile.am

+9-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@ bin_SCRIPTS = \
3232
geni-get-ad-rspecs
3333

3434
if INSTALL_GITHASH
35-
dist_pkgsysconf_DATA = geni-ch-githash
35+
pkgsysconf_DATA = geni-ch-githash
3636
endif
3737

38+
# GPO Lab
39+
# Install in /usr/local/lib, not /usr/lib
40+
PYFILES = portal_utils/__init__.py portal_utils/orbit_interface.py
3841
localpythondir = $(subst /usr/lib,/usr/local/lib,$(pythondir))
39-
nobase_dist_localpython_DATA = portal_utils/__init__.py portal_utils/orbit_interface.py
42+
if GPO_LAB
43+
nobase_dist_localpython_DATA = $(PYFILES)
44+
else
45+
nobase_dist_python_DATA = $(PYFILES)
46+
endif

bin/do-make-install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ set -e
99
cd ~/proto-ch
1010
autoreconf --install
1111
./configure --prefix=/usr --sysconfdir=/etc --bindir=/usr/local/bin \
12-
--sbindir=/usr/local/sbin --mandir=/usr/local/man
12+
--sbindir=/usr/local/sbin --mandir=/usr/local/man --enable-gpo-lab
1313
make
1414
sudo make install

configure.ac

+13-1
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,23 @@ fi
4242
AC_MSG_RESULT($apache_group)
4343
AC_SUBST(apache_group)
4444

45+
gpolab=yes
46+
AM_CONDITIONAL(GPO_LAB, [test x"$gpo_lab" = xyes])
47+
48+
AC_ARG_ENABLE([gpo_lab],
49+
[ --enable-gpo-lab Turn on GPO Lab modifications],
50+
[case "${enableval}" in
51+
yes) gpo_lab=true ;;
52+
no) gpo_lab=false ;;
53+
*) AC_MSG_ERROR([bad value ${enableval} for --enable-gpo-lab]) ;;
54+
esac],[gpo_lab=false])
55+
AM_CONDITIONAL([GPO_LAB], [test x$gpo_lab = xtrue])
56+
4557
AM_CONDITIONAL(INSTALL_GITHASH, [test -f bin/geni-ch-githash])
4658

4759
AC_CONFIG_FILES([Makefile etc/Makefile bin/Makefile])
4860
AC_CONFIG_FILES([sr/Makefile lib/Makefile])
4961
AC_CONFIG_FILES([kmtool/Makefile portal/Makefile openid/Makefile])
50-
AC_CONFIG_FILES([ca/Makefile sbin/Makefile ch/Makefile man/Makefile])
62+
AC_CONFIG_FILES([sbin/Makefile ch/Makefile man/Makefile])
5163
AC_CONFIG_FILES([doc/Makefile templates/Makefile])
5264
AC_OUTPUT

0 commit comments

Comments
 (0)