summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Esser <besser82@fedoraproject.org>2017-05-24 15:53:59 +0200
committerBjörn Esser <besser82@fedoraproject.org>2017-05-24 15:53:59 +0200
commit9774218a7692134be173e2000dc9b013672747a5 (patch)
tree041f1eea38af1b07c458408c60eee0a04c83f87f
parentb7447739b8d3a722a2d8e7305690b6ac3c548882 (diff)
downloadlua-9774218a7692134be173e2000dc9b013672747a5.tar.gz
lua-9774218a7692134be173e2000dc9b013672747a5.tar.xz
lua-9774218a7692134be173e2000dc9b013672747a5.zip
Add rpm-macros file, providing packaging macros for lua add-ons (#1447324)
-rw-r--r--lua.spec15
-rw-r--r--macros.lua.in14
2 files changed, 28 insertions, 1 deletions
diff --git a/lua.spec b/lua.spec
index 43b28e5..ecb294a 100644
--- a/lua.spec
+++ b/lua.spec
@@ -6,10 +6,13 @@
%global bootstrap_major_version 5.2
%global bootstrap_version %{bootstrap_major_version}.3
+# Place rpm-macros into proper location.
+%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
+
Name: lua
Version: %{major_version}.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Powerful light-weight programming language
Group: Development/Languages
License: MIT
@@ -23,6 +26,8 @@ Source2: http://www.lua.org/ftp/lua-%{bootstrap_version}.tar.gz
Source3: http://www.lua.org/tests/lua-%{version}-tests.tar.gz
# multilib
Source4: luaconf.h
+# rpm-macro
+Source1000: macros.lua.in
Patch0: %{name}-5.3.0-autotoolize.patch
Patch1: %{name}-5.3.0-idsize.patch
#Patch2: %%{name}-5.3.0-luac-shared-link-fix.patch
@@ -168,6 +173,10 @@ rm -rf $RPM_BUILD_ROOT/installdir
popd
%endif
+# Install rpm-macro
+mkdir -p $RPM_BUILD_ROOT/%{macrosdir}
+sed -e 's!@major_version@!%{major_version}!g' < %{SOURCE1000} > $RPM_BUILD_ROOT/%{macrosdir}/macros.lua
+
%files
%{!?_licensedir:%global license %%doc}
%license mit.txt
@@ -196,12 +205,16 @@ popd
%{_includedir}/l*.hpp
%{_libdir}/liblua.so
%{_libdir}/pkgconfig/*.pc
+%{macrosdir}/macros.lua
%files static
%{_libdir}/*.a
%changelog
+* Wed May 24 2017 Björn Esser <besser82@fedoraproject.org> - 5.3.4-2
+- Add rpm-macros file, providing packaging macros for lua add-ons (#1447324)
+
* Thu Feb 9 2017 Tom Callaway <spot@fedoraproject.org> 5.3.4-1
- update to 5.3.4
diff --git a/macros.lua.in b/macros.lua.in
new file mode 100644
index 0000000..00efba2
--- /dev/null
+++ b/macros.lua.in
@@ -0,0 +1,14 @@
+%luaver @major_version@
+%luanext %(echo '%{luaver}' | %{__awk} '{ sum = $1 + 0.1; print sum }')
+
+%lualibdir %{_libdir}/lua/%{luaver}
+%luapkgdir %{_datadir}/lua/%{luaver}
+
+%lua_requires \
+%if 0%{?fedora} || 0%{?rhel} >= 7 \
+Requires: lua(abi) = %{luaver} \
+%else \
+Requires: lua >= %{luaver} \
+Requires: lua < %{luanext} \
+%endif \
+%{nil}