summaryrefslogtreecommitdiffstats
path: root/storage/maria/libmarias3/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/libmarias3/rpm')
-rw-r--r--storage/maria/libmarias3/rpm/include.mk54
-rw-r--r--storage/maria/libmarias3/rpm/libmarias3.spec.in67
2 files changed, 121 insertions, 0 deletions
diff --git a/storage/maria/libmarias3/rpm/include.mk b/storage/maria/libmarias3/rpm/include.mk
new file mode 100644
index 00000000..0c424813
--- /dev/null
+++ b/storage/maria/libmarias3/rpm/include.mk
@@ -0,0 +1,54 @@
+# vim:ft=automake
+
+RPM_BUILDDIR= ~/rpmbuild
+RPM_SOURCESDIR= $(RPM_BUILDDIR)/SOURCES
+
+RPM_BUILD_TARGET= @PACKAGE@-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
+RPM_SOURCE= $(RPM_SOURCESDIR)/$(DIST_ARCHIVES)
+
+RPMS=
+RPMS+= $(RPM_BUILD_TARGET)
+RPMS+= @PACKAGE@-devel-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
+RPMS+= @PACKAGE@-debuginfo-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
+
+SRPMS= @PACKAGE@-@VERSION@-@RPM_RELEASE@.src.rpm
+
+RPM_DIST= $(RPMS) $(SRPMS)
+
+BUILD_RPMS= $(foreach rpm_iterator,$(RPMS),$(addprefix $(RPM_BUILDDIR)/RPMS/@build_cpu@/, $(rpm_iterator)))
+BUILD_SRPMS= $(foreach srpm_iterator,$(SRPMS),$(addprefix $(RPM_BUILDDIR)/SRPMS/, $(srpm_iterator)))
+BUILD_RPM_DIR= $(RPM_BUILDDIR)/BUILD/@PACKAGE@-@VERSION@
+
+$(RPM_BUILDDIR):
+ @@RPMDEV_SETUPTREE@
+
+$(DIST_ARCHIVES): $(DISTFILES)
+ $(MAKE) $(AM_MAKEFLAGS) dist-gzip
+
+$(RPM_SOURCE): $(DIST_ARCHIVES) $(RPM_BUILDDIR)
+ @cp $< $@
+
+$(RPM_BUILD_TARGET): rpm/@PACKAGE@.spec $(RPM_SOURCE)
+ -@rm -f $(BUILD_RPMS) $(BUILD_SRPMS)
+ -@rm -rf $(BUILD_RPM_DIR)
+ @@RPMBUILD@ -ba $<
+ @cp $(BUILD_RPMS) $(BUILD_SRPMS) .
+
+.PHONY: rpm-sign
+rpm-sign: $(RPM_BUILD_TARGET)
+ @@RPM@ --addsign $(RPM_DIST)
+ @@RPM@ --checksig $(RPM_DIST)
+
+.PHONY: clean-rpm
+clean-rpm:
+ -@rm -f $(BUILD_RPMS) $(BUILD_SRPMS) $(BUILD_RPM_SOURCE) $(RPM_DIST) $(BUILD_DAEMON_INIT)
+ -@rm -rf $(BUILD_RPM_DIR)
+
+dist-rpm: $(RPM_BUILD_TARGET)
+
+.PHONY: release
+release: rpm rpm-sign
+
+.PHONY: auto-rpmbuild
+auto-rpmbuild: rpm/@PACKAGE@.spec
+ @auto-br-rpmbuild -ba $<
diff --git a/storage/maria/libmarias3/rpm/libmarias3.spec.in b/storage/maria/libmarias3/rpm/libmarias3.spec.in
new file mode 100644
index 00000000..464dd929
--- /dev/null
+++ b/storage/maria/libmarias3/rpm/libmarias3.spec.in
@@ -0,0 +1,67 @@
+Summary: libMariaS3
+Name: @PACKAGE@
+Version: @VERSION@
+Release: 1
+License: LGPL v2.1
+Group: System Environment/Libraries
+BuildRequires: libcurl
+URL: https://github.com/mariadb-corporation/libmarias3
+
+Packager: Andrew Hutchings <linuxjedi@mariadb.com>
+
+Source: https://github.com/mariadb-corporation/libmarias3/releases/tag/%{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+%description
+libMariaS3 is a lightweight C library to read/write to AWS S3 buckets using objects in memory.
+
+This package provides the library.
+
+%package devel
+Summary: Header files and development libraries for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+This package contains the header files
+for %{name}. If you like to develop programs using %{name},
+you will need to install %{name}-devel.
+
+%prep
+%setup -q
+
+%configure
+
+
+%build
+%{__make} %{?_smp_mflags}
+
+%install
+%{__rm} -rf %{buildroot}
+%{__make} install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
+mkdir -p $RPM_BUILD_ROOT/
+
+%check
+%{__make} check
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE README.rst
+%{_libdir}/libmarias3.a
+%{_libdir}/libmarias3.la
+%{_libdir}/libmarias3.so
+%{_libdir}/libmarias3.so.*
+%{_bindir}/libmarias3-config
+
+%files devel
+%defattr(-,root,root,-)
+%doc LICENSE README.rst
+%{_includedir}/libmarias3/*.h
+%{_libdir}/pkgconfig/libmarias3.pc
+
+%changelog
+* Mon Mar 25 2019 Andrew Hutchings <linuxjedi@mariadb.com>
+- Initial package