[glom] Simplify macro usage
Kalev Lember
kalev at fedoraproject.org
Sat Mar 14 12:58:07 UTC 2015
commit af83a4a3e1a40de8dbdfb047bd677532a77c2068
Author: Kalev Lember <kalevlember at gmail.com>
Date: Sat Mar 14 11:13:26 2015 +0100
Simplify macro usage
Having major_version 1.26 and major_version_ 1.28 defines was just too
confusing. Rework it so it's easier to understand what's going on.
glom.spec | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/glom.spec b/glom.spec
index ef01fcb..29eae20 100644
--- a/glom.spec
+++ b/glom.spec
@@ -1,15 +1,16 @@
-%global major_version 1.26
-%global major_version_ 1.28
-%global minor_version 4
+%global apiver 1.26
+%global pyapiver %%(echo %{apiver} | tr . _)
+# first two digits of version
+%global release_version %%(echo %{version} | awk -F. '{print $1"."$2}')
Name: glom
-Version: %{major_version_}.%{minor_version}
+Version: 1.28.4
Release: 1%{?dist}
Summary: Easy-to-use database designer and user interface
License: GPLv2+
URL: http://www.glom.org/
-Source0: http://ftp.gnome.org/pub/GNOME/sources/glom/%{major_version_}/%{name}-%{major_version_}.%{minor_version}.tar.xz
+Source0: https://download.gnome.org/sources/glom/%{release_version}/glom-%{version}.tar.xz
BuildRequires: desktop-file-utils gettext-devel intltool
BuildRequires: libgdamm-devel >= 4.99.8
@@ -130,7 +131,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%{_bindir}/%{name}_export_po_all
%{_bindir}/%{name}_import_po_all
%{_bindir}/%{name}_test_connection
-%{python_sitearch}/%{name}_1_26.so
+%{python_sitearch}/%{name}_%{pyapiver}.so
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/*
@@ -138,20 +139,21 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%{_datadir}/appdata/%{name}.appdata.xml
%files libs
-%{_libdir}/lib%{name}-%{major_version}.so.*
+%{_libdir}/libglom-%{apiver}.so.*
%files devel
-%{_includedir}/glom-%{major_version}
-%{_libdir}/lib%{name}-%{major_version}.so
+%{_includedir}/glom-%{apiver}/
+%{_libdir}/libglom-%{apiver}.so
%{_libdir}/pkgconfig/*.pc
-%{_datadir}/devhelp/books/lib%{name}-%{major_version}/lib%{name}-%{major_version}.devhelp2
-%{_datadir}/doc/lib%{name}-%{major_version}/reference/*
-%{_datadir}/doc/py%{name}_1_26/reference/*
+%doc %{_datadir}/devhelp/
+%doc %{_docdir}/libglom-%{apiver}/
+%doc %{_docdir}/pyglom_%{pyapiver}/
%changelog
* Sat Mar 14 2015 Kalev Lember <kalevlember at gmail.com> - 1.28.4-1
- Update to 1.28.4
+- Simplify macro usage
* Tue Jan 27 2015 Petr Machata <pmachata at redhat.com> - 1.27.1-4
- Rebuild for boost 1.57.0
More information about the scm-commits
mailing list