mirror of
https://github.com/mariadb-corporation/libmarias3.git
synced 2025-04-18 16:24:01 +03:00
Add RPM and DEB package building
Fixes mariadb-corporation/libmarias3#3
This commit is contained in:
parent
d38ebdcfb5
commit
2ee973f2a6
2
.gitignore
vendored
2
.gitignore
vendored
@ -34,3 +34,5 @@ tags
|
||||
docs/latex/
|
||||
html/
|
||||
*.tar.gz
|
||||
*.rpm
|
||||
rpm/libmarias3.spec
|
||||
|
@ -32,6 +32,7 @@ DISTCLEANFILES+= aminclude.am
|
||||
|
||||
EXTRA_DIST+= README.rst
|
||||
EXTRA_DIST+= LICENSE
|
||||
EXTRA_DIST+= VERSION
|
||||
|
||||
aclocaldir= $(datadir)/aclocal
|
||||
dist_aclocal_DATA=
|
||||
@ -43,7 +44,7 @@ include src/include.am
|
||||
include libmarias3/include.am
|
||||
include tests/include.am
|
||||
#include examples/include.am
|
||||
#include rpm/include.mk
|
||||
include rpm/include.mk
|
||||
include docs/include.am
|
||||
include yatl/include.am
|
||||
|
||||
|
@ -106,6 +106,7 @@ AS_IF([test -n "${LSB_RELEASE}"],[
|
||||
AX_AM_JOBSERVER([yes])
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
rpm/libmarias3.spec
|
||||
version.h
|
||||
libmarias3.pc
|
||||
])
|
||||
|
6
debian/changelog
vendored
Normal file
6
debian/changelog
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
marias3 (1:1.0.1) unstable; urgency=low
|
||||
|
||||
* Add packaging support
|
||||
* Fix memory leaks
|
||||
|
||||
-- Andrew Hutchings <linuxjedi@mariadb.com> Mon, 25 Mar 2019 12:24:20 +0000
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
9
|
14
debian/control
vendored
Normal file
14
debian/control
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
Source: marias3
|
||||
Maintainer: Andrew Hutchings <linuxjedi@mariadb.com>
|
||||
|
||||
Package: libmarias3
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: a lightweight C library to read/write to AWS S3 buckets using objects in memory.
|
||||
|
||||
Package: libmarias3-dev
|
||||
Architecture: any
|
||||
Section: libdevel
|
||||
Depends: libmarias3 (= ${binary:Version}), ${misc:Depends}
|
||||
Description: a lightweight C library to read/write to AWS S3 buckets using objects in memory.
|
30
debian/copyright
vendored
Normal file
30
debian/copyright
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: libmarias3
|
||||
Upstream-Contact: Andrew Hutchings <linuxjedi@mariadb.com>
|
||||
Maintainer: Andrew Hutchings <linuxjedi@mariadb.com>
|
||||
Source: https://github.com/mariadb-corporation/marias3
|
||||
|
||||
Files: *
|
||||
Copyright: 2019 MariaDB Corporation Ab
|
||||
License: LGPL-2.1
|
||||
|
||||
License: LGPL-2.1
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
.
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301 USA
|
||||
.
|
||||
On Debian systems, the full text of the Lesser GNU General Public
|
||||
License version 2,1 can be found in the file
|
||||
'/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
2
debian/libmarias3-dev.install
vendored
Normal file
2
debian/libmarias3-dev.install
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/include/libmarias3
|
||||
usr/lib/x86_64-linux-gnu/pkgconfig/libmarias3.pc
|
2
debian/libmarias3.install
vendored
Normal file
2
debian/libmarias3.install
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/lib/x86_64-linux-gnu/libmarias3.*
|
||||
usr/bin/libmarias3-config
|
4
debian/rules
vendored
Executable file
4
debian/rules
vendored
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@
|
54
rpm/include.mk
Normal file
54
rpm/include.mk
Normal file
@ -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 $<
|
67
rpm/libmarias3.spec.in
Normal file
67
rpm/libmarias3.spec.in
Normal file
@ -0,0 +1,67 @@
|
||||
Summary: libMariaS3
|
||||
Name: @PACKAGE@
|
||||
Version: @VERSION@
|
||||
Release: 1
|
||||
License: LGPL v2.1
|
||||
Group: System Environment/Libraries
|
||||
BuildRequires: libcurl libxml2 mhash
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user