summaryrefslogtreecommitdiffstats
path: root/storage/maria/libmarias3/rpm/include.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /storage/maria/libmarias3/rpm/include.mk
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/maria/libmarias3/rpm/include.mk')
-rw-r--r--storage/maria/libmarias3/rpm/include.mk54
1 files changed, 54 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 $<