Commit b47413a5 authored by Dave Dykstra's avatar Dave Dykstra
Browse files

Use a common Makefile for installing on debian and redhat

parent 615b534d
#!/usr/bin/make -f
# This make file takes care of installing files
all: # nothing to build
# default install target is debian because that's the easist way to
# set up the 'rules' file.
install: install-debian
install-common:
mkdir -p $(DESTDIR)/etc/cvmfs/default.d \
$(DESTDIR)/etc/cvmfs/config.d \
$(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org
install -D -m 444 60-osg.conf $(DESTDIR)/etc/cvmfs/default.d
install -D -m 444 config-osg.opensciencegrid.org.conf $(DESTDIR)/etc/cvmfs/config.d
install -D -m 444 opensciencegrid.org.pub $(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org
install-debian: install-common
mkdir -p $(DESTDIR)/lib/systemd/system \
$(DESTDIR)/lib/systemd/system/autofs.service.wants \
$(DESTDIR)/usr/sbin
install -D -m 444 cvmfs-config-osg.service $(DESTDIR)/lib/systemd/system
ln -s ../cvmfs-config-osg.service $(DESTDIR)/lib/systemd/system/autofs.service.wants/cvmfs-config-osg.service
install -D -m 555 cvmfs-config-osgd $(DESTDIR)/usr/sbin
# assume DESTDIR=$RPM_BUILD_ROOT is passed in
install-redhat: install-common
#!/usr/bin/make -f
# This make file takes care of installing the files
all: # nothing to build
install:
mkdir -p $(DESTDIR)/etc/cvmfs/default.d \
$(DESTDIR)/etc/cvmfs/config.d \
$(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org \
$(DESTDIR)/lib/systemd/system \
$(DESTDIR)/lib/systemd/system/autofs.service.wants \
$(DESTDIR)/usr/sbin
cp 60-osg.conf $(DESTDIR)/etc/cvmfs/default.d
cp config-osg.opensciencegrid.org.conf $(DESTDIR)/etc/cvmfs/config.d
cp opensciencegrid.org.pub $(DESTDIR)/etc/cvmfs/keys/opensciencegrid.org
cp cvmfs-config-osg.service $(DESTDIR)/lib/systemd/system
ln -s ../cvmfs-config-osg.service $(DESTDIR)/lib/systemd/system/autofs.service.wants/cvmfs-config-osg.service
cp cvmfs-config-osgd $(DESTDIR)/usr/sbin
......@@ -39,7 +39,6 @@ mkdir ${workdir}/src/$PKG
cp -R $srctree/* ${workdir}/src/$PKG
mkdir ${workdir}/src/$PKG/debian
cp -R ${workdir}/tmp/packaging/debian/* ${workdir}/src/$PKG/debian
cp ${workdir}/tmp/packaging/debian/Makefile ${workdir}/src/$PKG
echo "done"
echo -n "figuring out version number from rpm packaging... "
......
......@@ -33,18 +33,7 @@ Default configuration parameters and public keys for CernVM-FS
%install
rm -rf $RPM_BUILD_ROOT
for cvmfsdir in keys/opensciencegrid.org config.d default.d; do
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cvmfs/$cvmfsdir
done
for key in opensciencegrid.org.pub; do
install -D -m 444 "${key}" $RPM_BUILD_ROOT%{_sysconfdir}/cvmfs/keys/opensciencegrid.org
done
for defaultconf in 60-osg.conf; do
install -D -m 444 "${defaultconf}" $RPM_BUILD_ROOT%{_sysconfdir}/cvmfs/default.d
done
for conf in config-osg.opensciencegrid.org.conf; do
install -D -m 444 "${conf}" $RPM_BUILD_ROOT%{_sysconfdir}/cvmfs/config.d
done
make install-redhat DESTDIR=$RPM_BUILD_ROOT
%files
%dir %{_sysconfdir}/cvmfs/keys/opensciencegrid.org
......@@ -53,7 +42,7 @@ done
%config %{_sysconfdir}/cvmfs/config.d/*
%changelog
* Fri Feb 24 2017 Dave Dykstra <dwd@fnal.gov> - 2.0-2
* Tue Feb 28 2017 Dave Dykstra <dwd@fnal.gov> - 2.0-2
- Convert to store source on github.
* Wed Feb 15 2017 Dave Dykstra <dwd@fnal.gov> - 2.0-1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment