forked from membase/libvbucket
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build RPM package for CentOS, RedHat etc.
Change-Id: I34b70db748ebb0f7b6780bde4730b64601d96c89 Reviewed-on: http://review.couchbase.org/11459 Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com> Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
%define _topdir %(pwd)/rpmbuild | ||
|
||
Summary: vbucket library for memcached | ||
Name: libvbucket | ||
Version: @VERSION@ | ||
Release: @RELEASE@ | ||
Vendor: Couchbase, Inc. | ||
Packager: Couchbase SDK Team <support@couchbase.com> | ||
License: Apache-2 | ||
Group: System Environment/Libraries | ||
URL: https://github.com/membase/libvbucket | ||
Source: %{name}-%{version}_%{release}.tar.gz | ||
BuildRoot: build/%{name}-%{version}_%{release} | ||
|
||
%description | ||
libvbucket is a library providing vbucket distribution layer for memcached | ||
clients. | ||
|
||
%package -n %{name}1 | ||
Group: System Environment/Libraries | ||
Summary: vbucket library for memcached | ||
|
||
%description -n %{name}1 | ||
libvbucket is a library providing vbucket distribution layer for memcached | ||
clients. | ||
|
||
%package devel | ||
Group: Development/Libraries | ||
Summary: vbucket library for memcached - Header files | ||
Requires: %{name}1 | ||
|
||
%description devel | ||
Development files for the vbucket library for memcached. | ||
|
||
%prep | ||
%setup -q -n %{name}-%{version}_%{release} | ||
%configure | ||
|
||
%build | ||
%{__make} %{_smp_mflags} | ||
|
||
%install | ||
%{__make} install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS="" | ||
|
||
%clean | ||
%{__rm} -rf %{buildroot} | ||
|
||
%post -n %{name}1 -p /sbin/ldconfig | ||
|
||
%postun -n %{name}1 -p /sbin/ldconfig | ||
|
||
%files -n %{name}1 | ||
%defattr(-, root, root) | ||
%{_libdir}/libvbucket.so.* | ||
|
||
%files devel | ||
%defattr(-, root, root) | ||
%doc README.markdown LICENSE | ||
%{_bindir}/vbucketkeygen | ||
%{_bindir}/vbuckettool | ||
%{_includedir}/libvbucket | ||
%{_libdir}/libvbucket.la | ||
%{_libdir}/libvbucket.so | ||
%{_libdir}/pkgconfig/libvbucket.pc | ||
%{_mandir}/**/* | ||
|
||
%changelog | ||
* Mon Dec 05 2011 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.7.2 | ||
- Initial packaging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.PHONY: dist-rpm | ||
|
||
RPM_WORKSPACE=$(shell pwd)/build | ||
RPM_DIR=$(RPM_WORKSPACE)/rpmbuild | ||
RPM_VER=$(shell echo $(VERSION) | awk -F_ '{ print $$1 }') | ||
RPM_REL=$(shell echo $(VERSION) | awk -F_ '{ print $$2"_"$$3 }') | ||
|
||
dist-rpm: dist | ||
rm -rf $(RPM_WORKSPACE) | ||
mkdir -p $(RPM_DIR) | ||
mkdir $(RPM_DIR)/SOURCES | ||
mkdir $(RPM_DIR)/BUILD | ||
mkdir $(RPM_DIR)/RPMS | ||
mkdir $(RPM_DIR)/SRPMS | ||
cp $(PACKAGE)-$(VERSION).tar.gz $(RPM_DIR)/SOURCES | ||
sed 's/@VERSION@/$(RPM_VER)/g;s/@RELEASE@/$(RPM_REL)/g' < packaging/rpm/$(PACKAGE).spec.in > $(RPM_WORKSPACE)/$(PACKAGE).spec | ||
(cd $(RPM_WORKSPACE); rpmbuild -ba $(PACKAGE).spec) | ||
mv $(RPM_DIR)/RPMS/*/*.rpm `pwd` | ||
mv $(RPM_DIR)/SRPMS/*.rpm `pwd` | ||
rm -rf $(RPM_WORKSPACE) |