diff options
author | Hubert Plociniczak <hubert@lshift.net> | 2008-09-12 12:24:22 +0100 |
---|---|---|
committer | Hubert Plociniczak <hubert@lshift.net> | 2008-09-12 12:24:22 +0100 |
commit | 57113b57f30914181c987fff25c80308dd98bc50 (patch) | |
tree | 3a0c7a5b94c9056e3fc18e36d26cecd2c9d73ba5 | |
parent | 732caaf520703ef8adf6dc161dfaaed95036f68d (diff) | |
download | rabbitmq-server-57113b57f30914181c987fff25c80308dd98bc50.tar.gz |
Append rpm-specific files to the source tarball.
Cleaned up the rpm Makefile.
-rw-r--r-- | packaging/RPMS/Fedora/Makefile | 45 | ||||
-rw-r--r-- | packaging/RPMS/Fedora/rabbitmq-server.spec | 6 |
2 files changed, 30 insertions, 21 deletions
diff --git a/packaging/RPMS/Fedora/Makefile b/packaging/RPMS/Fedora/Makefile index 6cc3579b..6e1b06b9 100644 --- a/packaging/RPMS/Fedora/Makefile +++ b/packaging/RPMS/Fedora/Makefile @@ -6,30 +6,39 @@ TARBALL=$(SOURCE_TARBALL_DIR)/rabbitmq-server-$(VERSION).tar.gz TOP_DIR=$(shell pwd) RPM_VERSION=$(shell echo $(VERSION) | tr - _) DEFINES=--define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp' --define 'main_version $(VERSION)' --define 'rpm_version $(RPM_VERSION)' +RPM_SOURCE_DIR=rabbitmq-server-$(VERSION)/rpm rpms: clean server #Create proper environment for making rpms prepare: - mkdir -p $(TOP_DIR)/BUILD - mkdir -p $(TOP_DIR)/SOURCES - mkdir -p $(TOP_DIR)/SPECS - mkdir -p $(TOP_DIR)/SRPMS - mkdir -p $(TOP_DIR)/RPMS - mkdir -p $(TOP_DIR)/tmp - cp $(TOP_DIR)/$(TARBALL) $(TOP_DIR)/SOURCES - cp $(TOP_DIR)/rabbitmq-server.spec $(TOP_DIR)/SPECS - cp $(TOP_DIR)/init.d $(TOP_DIR)/BUILD - cp $(TOP_DIR)/rabbitmqctl_wrapper $(TOP_DIR)/BUILD - cp $(TOP_DIR)/rabbitmq-server.logrotate $(TOP_DIR)/BUILD + mkdir -p BUILD + mkdir -p SOURCES + mkdir -p SPECS + mkdir -p SRPMS + mkdir -p RPMS + mkdir -p tmp + cp $(TOP_DIR)/$(TARBALL) SOURCES + cp rabbitmq-server.spec SPECS + + mkdir -p tmp/$(RPM_SOURCE_DIR) + cp init.d tmp/$(RPM_SOURCE_DIR) + cp rabbitmqctl_wrapper tmp/$(RPM_SOURCE_DIR) + cp rabbitmq-server.logrotate tmp/$(RPM_SOURCE_DIR) + + gunzip SOURCES/rabbitmq-server-$(VERSION).tar.gz + tar -C tmp -rf $(TOP_DIR)/SOURCES/rabbitmq-server-$(VERSION).tar \ + $(RPM_SOURCE_DIR)/ + gzip SOURCES/rabbitmq-server-$(VERSION).tar + rm -rf tmp/rabbitmq-server* server: prepare - rpmbuild -ba $(TOP_DIR)/SPECS/rabbitmq-server.spec $(DEFINES) --target noarch + rpmbuild -ba SPECS/rabbitmq-server.spec $(DEFINES) --target noarch clean: - rm -rf $(TOP_DIR)/SOURCES/ - rm -rf $(TOP_DIR)/SPECS/ - rm -rf $(TOP_DIR)/RPMS/ - rm -rf $(TOP_DIR)/SRPMS/ - rm -rf $(TOP_DIR)/BUILD/ - rm -rf $(TOP_DIR)/tmp/ + rm -rf SOURCES + rm -rf SPECS + rm -rf RPMS + rm -rf SRPMS + rm -rf BUILD + rm -rf tmp diff --git a/packaging/RPMS/Fedora/rabbitmq-server.spec b/packaging/RPMS/Fedora/rabbitmq-server.spec index 08694c09..b06a88d6 100644 --- a/packaging/RPMS/Fedora/rabbitmq-server.spec +++ b/packaging/RPMS/Fedora/rabbitmq-server.spec @@ -51,17 +51,17 @@ mkdir -p %{buildroot}/var/log/rabbitmq mkdir -p %{buildroot}/etc/rc.d/init.d/ #Copy all necessary lib files etc. -cp ../init.d %{buildroot}/etc/rc.d/init.d/rabbitmq-server +cp rpm/init.d %{buildroot}/etc/rc.d/init.d/rabbitmq-server chmod 0755 %{buildroot}/etc/rc.d/init.d/rabbitmq-server mv %{buildroot}/usr/sbin/rabbitmqctl %{buildroot}/usr/sbin/rabbitmqctl_real -cp ../rabbitmqctl_wrapper %{buildroot}/usr/sbin/rabbitmqctl +cp rpm/rabbitmqctl_wrapper %{buildroot}/usr/sbin/rabbitmqctl chmod 0755 %{buildroot}/usr/sbin/rabbitmqctl cp %{buildroot}%{_mandir}/man1/rabbitmqctl.1.gz %{buildroot}%{_mandir}/man1/rabbitmqctl_real.1.gz mkdir -p %{buildroot}/etc/logrotate.d -cp ../rabbitmq-server.logrotate %{buildroot}/etc/logrotate.d/rabbitmq-server +cp rpm/rabbitmq-server.logrotate %{buildroot}/etc/logrotate.d/rabbitmq-server %post # create rabbitmq group |