Changeset 953 for branches/1.1/Makefile


Ignore:
Timestamp:
03/05/14 17:07:58 (6 years ago)
Author:
olahaye
Message:

Packaging: Added support for native systemd service files (Makefile and rpm side)
Reworked rpm to add --with flags for easy rpm customization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/Makefile

    r951 r953  
    2727FAKEROOT = fakeroot
    2828
    29 VERSION = 1.1.2
     29VERSION = 1.2.0
    3030RELEASE = 1
    3131
     
    5555        @mv -f ${TMPDIR}/ganglia_jobmonarch-${VERSION}.tar.gz .. 2> /dev/null || true
    5656        @echo "Wrote: ../ganglia_jobmonarch-${VERSION}.tar.gz"
     57        @rm -rf $(TMPDIR)/.monarch_buildroot
    5758
    5859tarball-bzip:   $(TMPDIR)/.monarch_buildroot ${REQUIRED}
     
    6061        @mv -f ${TMPDIR}/ganglia_jobmonarch-${VERSION}.tar.bz2 .. 2> /dev/null || true
    6162        @echo "Wrote: ../ganglia_jobmonarch-${VERSION}.tar.bz2"
     63        @rm -rf $(TMPDIR)/.monarch_buildroot
    6264
    6365rpm: tarball-bzip
    6466        # Binary package will reflect most distro where ganglia default location is /usr/share/ganglia
    65         @LC_ALL=C rpmbuild -tb --define '%custom_web_prefixdir /usr/share/ganglia' ../ganglia_jobmonarch-${VERSION}.tar.bz2|grep "Wrote: "
     67        @LC_ALL=C rpmbuild -tb --with web_prefixdir=/usr/share/ganglia-webfrontend ../ganglia_jobmonarch-${VERSION}.tar.bz2|grep "Wrote: "
    6668
    6769srpm: tarball-bzip
     
    112114        @if test -r /etc/redhat-release; then \
    113115                echo; \
    114                 echo "Red Hat detected: installing RPM service files in /etc"; \
    115                 sed -i -e 's|DAEMON=.*|DAEMON=$(JOBMOND)|g' pkg/rpm/init.d/jobmond; \
    116                 sed -i -e 's|DAEMON=.*|DAEMON=$(JOBARCHIVED)|g' pkg/rpm/init.d/jobarchived; \
    117                 install -m 0755 -d $(DESTDIR)/etc/rc.d/init.d; \
    118                 install -m 0755 pkg/rpm/init.d/jobmond $(DESTDIR)/etc/rc.d/init.d/; \
    119                 install -m 0755 pkg/rpm/init.d/jobarchived $(DESTDIR)/etc/rc.d/init.d/; \
     116                echo "Red Hat detected: installing RPM service files."; \
     117                if test -d /usr/lib/systemd/system; then \
     118                        echo "Using systemd service files."; \
     119                        install -m 0755 -d $(DESTDIR)/usr/lib/systemd/system; \
     120                        install -m 0755 pkg/rpm/systemd/jobmond.service $(DESTDIR)/usr/lib/systemd/system/; \
     121                        install -m 0755 pkg/rpm/systemd/jobarchived.service $(DESTDIR)/usr/lib/systemd/system/; \
     122                else \
     123                        echo "Using initscripts service files."; \
     124                        sed -i -e 's|DAEMON=.*|DAEMON=$(JOBMOND)|g' pkg/rpm/init.d/jobmond; \
     125                        sed -i -e 's|DAEMON=.*|DAEMON=$(JOBARCHIVED)|g' pkg/rpm/init.d/jobarchived; \
     126                        install -m 0755 -d $(DESTDIR)/etc/rc.d/init.d; \
     127                        install -m 0755 pkg/rpm/init.d/jobmond $(DESTDIR)/etc/rc.d/init.d/; \
     128                        install -m 0755 pkg/rpm/init.d/jobarchived $(DESTDIR)/etc/rc.d/init.d/; \
     129                fi; \
    120130                install -m 0755 -d $(DESTDIR)/etc/sysconfig; \
    121131                install -m 0755 pkg/rpm/sysconfig/jobmond $(DESTDIR)/etc/sysconfig; \
    122132                install -m 0755 pkg/rpm/sysconfig/jobarchived $(DESTDIR)/etc/sysconfig; \
    123     else \
     133        else \
    124134                sed -i -e 's|DAEMON=.*|DAEMON=$(JOBMOND)|g' debian/jobmonarch-jobmond.init; \
    125135                sed -i -e 's|DAEMON=.*|DAEMON=$(JOBARCHIVED)|g' debian/jobmonarch-jobarchived.init; \
Note: See TracChangeset for help on using the changeset viewer.