Changeset 841 for branches/1.0/Makefile
- Timestamp:
- 04/25/13 16:54:27 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/Makefile
r840 r841 2 2 # 3 3 TMPDIR = /tmp 4 DESTDIR = /usr/local 4 5 # Where to install 6 DESTDIR = 7 8 # Install prefix 9 PREFIX = /usr/local 10 11 # What is the location of the Ganglia web frontend 12 # i.e.: where to we install Job Monarch's web frontend addon 13 # 14 GANGLIA_ROOT = $(PREFIX)/ganglia 15 16 # Where jobarchived RRDS are stored 17 JOBARCHIVE_RRDS = $(PREFIX)/jobmonarch 5 18 6 19 # Clear this if you don't want to use ${FAKEROOT} 7 20 # 8 21 FAKEROOT = fakeroot 9 10 # What is the location of the Ganglia web frontend11 # i.e.: where to we install Job Monarch's web frontend addon12 #13 WEBDIR = /var/www/ganglia14 22 15 23 VERSION = 1.0 … … 25 33 tarball: tarball-gzip tarball-bzip 26 34 27 tarball-gzip: ${REQUIRED} rpmspec35 tarball-gzip: ${REQUIRED} ./pkg/rpm/jobmonarch.spec 28 36 mkdir -p ${TMPDIR}/.monarch_buildroot/ganglia_jobmonarch-${VERSION} 29 37 ( rsync -a --exclude=.svn --exclude=*_test* --exclude=*-example.php \ … … 32 40 mv ${TMPDIR}/.monarch_buildroot/ganglia_jobmonarch-${VERSION}.tar.gz .. 33 41 34 tarball-bzip: ${REQUIRED} rpmspec42 tarball-bzip: ${REQUIRED} ./pkg/rpm/jobmonarch.spec 35 43 mkdir -p ${TMPDIR}/.monarch_buildroot/ganglia_jobmonarch-${VERSION} 36 44 ( rsync -a --exclude=.svn --exclude=*_test* --exclude=*-example.php \ … … 39 47 mv ${TMPDIR}/.monarch_buildroot/ganglia_jobmonarch-${VERSION}.tar.bz2 .. 40 48 41 rpmspec: pkg/rpm/jobmonarch.spec.in 42 sed -e 's/__VERSION__/$(VERSION)/g' -e 's/__RELEASE__/$(RELEASE)/g' ./pkg/rpm/jobmonarch.spec.in > jobmonarch.spec 49 rpmspec: ./pkg/rpm/jobmonarch.spec 43 50 44 debpkgdir: pkg/deb/debian 45 rsync -a --exclude=.svn pkg/deb/debian debian 51 ./pkg/rpm/jobmonarch.spec: pkg/rpm/jobmonarch.spec.in 52 sed -e 's/__VERSION__/$(VERSION)/g' -e 's/__RELEASE__/$(RELEASE)/g' ./pkg/rpm/jobmonarch.spec.in > ./pkg/rpm/jobmonarch.spec 53 54 debian: pkg/deb/debian 55 rsync -a --exclude=.svn pkg/deb/debian ./ 46 56 sed -i -e 's/^Version:.*$//Version: $(VERSION)-$(RELEASE)/g' ./debian/control 47 57 … … 49 59 rpmbuild -tb ../ganglia_jobmonarch-${VERSION}.tar.bz2 50 60 51 deb: deb pkgdir61 deb: debian 52 62 dpkg-buildpackage -b 53 63 54 64 install: 55 # Files in SBIN_DIR 56 install -m 0755 -d $(DESTDIR)/usr/sbin 57 install -m 0755 jobmond/jobmond.py $(DESTDIR)/usr/sbin/ 58 install -m 0755 jobarchived/jobarchived.py $(DESTDIR)/usr/sbin/ 59 (cd $(DESTDIR)/usr/sbin/; ln -s jobmond.py jobmond; ln -s jobarchived.py jobarchived) 60 # 61 # Files specific to distros if /etc/sysconfig => rpm else (/etc/default => debian) 62 if test -d /etc/sysconfig; then \ 65 @# 66 @# Set the correct GANGLIA_PATH. 67 @# 68 @echo "\nUsing $(GANGLIA_ROOT) as Ganglia root installation path. If it's not what" 69 @echo "you want, use make GANGLIA_ROOT=/path/to/your/ganglia/root ." 70 @sed -i -e 's|/var/www/ganglia/|$(GANGLIA_ROOT)/|g' web/addons/job_monarch/conf.php 71 @# 72 @# Set the correct JOBARCHIVE_RRDS in jobarchve.conf and ganglia conf.php 73 @# 74 @echo "\nUsing $(JOBARCHIVE_RRDS) as jobarchive path to store rrds files. If it's not what" 75 @echo "you want, use make JOBARCHIVE_RRDS=/path/to/you/jobarchived/rrdsfiles ." 76 @sed -i -e 's|/var/lib/jobarchive|$(JOBARCHIVE_RRDS)|g' jobarchived/jobarchived.conf web/addons/job_monarch/conf.php 77 @# 78 @# Files in SBIN_DIR 79 @# 80 @echo "\nInstalling jobmond.py and jobarchived.py to $(PREFIX)/sbin" 81 @install -m 0755 -d $(DESTDIR)$(PREFIX)/sbin 82 @install -m 0755 jobmond/jobmond.py $(DESTDIR)$(PREFIX)/sbin/ 83 @install -m 0755 jobarchived/jobarchived.py $(DESTDIR)$(PREFIX)/sbin/ 84 @(cd $(DESTDIR)$(PREFIX)/sbin/; ln -s jobmond.py jobmond; ln -s jobarchived.py jobarchived) 85 @# 86 @# Files specific to distros if /etc/sysconfig => rpm else (/etc/default => debian) 87 @# 88 @echo "\nInstalling service files in $(DESTDIR)/etc" 89 @if test -d /etc/sysconfig; then \ 63 90 install -m 0755 -d $(DESTDIR)/etc/rc.d/init.d; \ 64 91 install -m 0755 pkg/rpm/init.d/jobmond $(DESTDIR)/etc/rc.d/init.d/; \ … … 75 102 install -m 0755 pkg/deb/default/jobarchived $(DESTDIR)/etc/default; \ 76 103 fi 77 # 78 # Files in /etc 79 # 80 install -m 0644 jobmond/jobmond.conf $(DESTDIR)/etc; \ 81 install -m 0644 jobarchived/jobarchived.conf $(DESTDIR)/etc; \ 82 # 83 # Files in /usr/share 84 # 85 install -m 0755 -d $(DESTDIR)/usr/share/jobarchived/ 86 install -m 0755 jobarchived/job_dbase.sql $(DESTDIR)/usr/share/jobarchived/ 87 # 88 # Create the /var/lib/jobarchive directory where rrds are stored. 89 # 90 install -m 0755 -d $(DESTDIR)/var/lib/jobarchive/ 91 # 92 # Files for ganglia (adapt to rpm or deb or unknown ganglia packaging) 93 # 94 if test -d /etc/sysconfig; then \ 95 install -m 0755 -d $(DESTDIR)/usr/share/ganglia; \ 96 (cd web; rsync -a --exclude=.svn --exclude=*_test* --exclude=*-example.php . $(DESTDIR)/usr/share/ganglia); \ 97 elif test -d /etc/default; then \ 98 install -m 0755 -d $(DESTDIR)/usr/share/ganglia-webfrontend; \ 99 (cd web; rsync -a --exclude=.svn --exclude=*_test* --exclude=*-example.php . $(DESTDIR)/usr/share/ganglia-webfrontend); \ 100 else \ 101 install -m 0755 -d $(DESTDIR)/$(WEBDIR); \ 102 (cd web; rsync -a --exclude=.svn --exclude=*_test* --exclude=*-example.php . $(DESTDIR)/$(WEBDIR)); \ 103 fi 104 104 @# 105 @# Files in /etc 106 @# 107 @echo "\nInstalling config files jobmond.conf jobarchived.conf in $(DESTDIR)/etc" 108 @install -m 0644 jobmond/jobmond.conf $(DESTDIR)/etc 109 @install -m 0644 jobarchived/jobarchived.conf $(DESTDIR)/etc 110 @# 111 @# Files in /usr/share 112 @# 113 @echo "\nInstalling job_dbase.sql in $(PREFIX)/share/jobarchived" 114 @install -m 0755 -d $(DESTDIR)$(PREFIX)/share/jobarchived 115 @install -m 0755 jobarchived/job_dbase.sql $(DESTDIR)$(PREFIX)/share/jobarchived/ 116 @# 117 @# Create the /var/lib/jobarchive directory where rrds are stored. 118 @# 119 @echo "\nCreating the directory where RRDs will be stored: $(JOBARCHIVE_RRDS)" 120 @install -m 0755 -d $(DESTDIR)$(JOBARCHIVE_RRDS) 121 @# 122 @# Files for ganglia (adapt to rpm or deb or unknown ganglia packaging) 123 @# 124 @echo "\nInstalling Ganglia web interface to $(GANGLIA_ROOT) ." 125 @install -m 0755 -d $(DESTDIR)$(GANGLIA_ROOT) 126 @(cd web; rsync -a --exclude=.svn --exclude=*_test* --exclude=*-example.php . $(DESTDIR)$(GANGLIA_ROOT)/) 127 @# 128 @echo "\nInstallation complete.\n" 105 129 106 130 deb-webfrontend: ${REQUIRED} 107 131 mkdir -p ${TMPDIR}/.monarch_buildroot/jobmonarch-webfrontend_${VERSION}-${RELEASE}/DEBIAN >/dev/null 108 mkdir -p ${TMPDIR}/.monarch_buildroot/jobmonarch-webfrontend_${VERSION}-${RELEASE}/${ WEBDIR} >/dev/null132 mkdir -p ${TMPDIR}/.monarch_buildroot/jobmonarch-webfrontend_${VERSION}-${RELEASE}/${GANGLIA_ROOT} >/dev/null 109 133 ( cd web; rsync -a --exclude=.svn --exclude=*_test* --exclude=*-example.php \ 110 . ${TMPDIR}/.monarch_buildroot/jobmonarch-webfrontend_${VERSION}-${RELEASE}/${ WEBDIR} )134 . ${TMPDIR}/.monarch_buildroot/jobmonarch-webfrontend_${VERSION}-${RELEASE}/${GANGLIA_ROOT} ) 111 135 ( cd pkg/deb/web/DEBIAN; \ 112 136 rsync -a --exclude=.svn --exclude=*_test* --exclude=*-example.php \ … … 165 189 clean: 166 190 rm -rf ${TMPDIR}/.monarch_buildroot 167 rm -rf ./ jobmonarch.spec191 rm -rf ./pkg/rpm/jobmonarch.spec 168 192 rm -rf ./debian
Note: See TracChangeset
for help on using the changeset viewer.