[packages/rpm-pld-macros] initial erlang macros; up to 2.035
atler
atler at pld-linux.org
Thu Nov 14 18:02:30 CET 2024
commit 3f9405eed40dc2da4b19678b3517d13a8829df7b
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Nov 14 17:28:43 2024 +0100
initial erlang macros; up to 2.035
starting with version 17 major number is equivalent to OTP version hence
require erlang >= 17 for simplicity
application built with major version X cannot be loaded with X-1 so
require at least version X. do include minor number too as higher minor
means new features which application might make use of.
include strict OTP dep to make sure installed erlang still supports it.
macros.erlang | 12 ++++++++++++
rpm-pld-macros.spec | 9 +++++----
2 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/rpm-pld-macros.spec b/rpm-pld-macros.spec
index ab57170..5b85e4d 100644
--- a/rpm-pld-macros.spec
+++ b/rpm-pld-macros.spec
@@ -1,4 +1,4 @@
-%define rpm_macros_rev 2.034
+%define rpm_macros_rev 2.035
%define find_lang_rev 1.42
# split into individual X_prov_ver if there is a reason to desync
%define prov_ver 4.15
@@ -6,7 +6,7 @@ Summary: PLD Linux RPM macros
Summary(pl.UTF-8): Makra RPM dla Linuksa PLD
Name: rpm-pld-macros
Version: %{rpm_macros_rev}
-Release: 5
+Release: 1
License: GPL v2+
Group: Development/Building
Source0: macros.pld
@@ -53,7 +53,7 @@ Source55: macros.rust
Source56: macros.arch
Source57: macros.go
Source58: macros.qt
-
+Source59: macros.erlang
Source60: macros.gstreamer
Source61: attr.gstreamer
@@ -246,7 +246,7 @@ cp -p %{SOURCE55} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.rust
cp -p %{SOURCE56} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.arch
cp -p %{SOURCE57} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.go
cp -p %{SOURCE58} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.qt
-
+cp -p %{SOURCE59} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.erlang
cp -p %{SOURCE60} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.gstreamer
cp -p %{SOURCE61} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/gstreamer.attr
cp -p %{SOURCE63} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/mono.attr
@@ -272,6 +272,7 @@ rm -rf $RPM_BUILD_ROOT
%{_usrlibrpm}/macros.d/macros.browser-plugins
%{_usrlibrpm}/macros.d/macros.cacti
%{_usrlibrpm}/macros.d/macros.emacs
+%{_usrlibrpm}/macros.d/macros.erlang
%{_usrlibrpm}/macros.d/macros.ghc
%{_usrlibrpm}/macros.d/macros.go
%{_usrlibrpm}/macros.d/macros.gstreamer
diff --git a/macros.erlang b/macros.erlang
new file mode 100644
index 0000000..7724c11
--- /dev/null
+++ b/macros.erlang
@@ -0,0 +1,12 @@
+# BuildRequires: rpmbuild(macros) >= 2.035
+
+%__erl /usr/bin/erl
+%__mix /usr/bin/mix
+%__rebar /usr/bin/rebar
+
+# BuildRequires: erlang >= 2:17
+
+%erlang_otp %{expand:%%global erlang_otp %(rpm -q --qf '%{V}' erlang | cut -d. -f1)}%erlang_otp
+
+%erlang_requires %{expand:%%global erlang_requires Requires: erlang(OTP) = %erlang_otp\\\
+Requires: erlang >= %(rpm -q --qf='%|E?{%{E}:}|%{V}' erlang|cut -d. -f1,2)}%erlang_requires
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-pld-macros.git/commitdiff/3f9405eed40dc2da4b19678b3517d13a8829df7b
More information about the pld-cvs-commit
mailing list