Skip to content

Commit d1ace49

Browse files
committed
spec: Adjustments and optimizations
1 parent 51250e7 commit d1ace49

1 file changed

Lines changed: 33 additions & 26 deletions

File tree

libpkgmanifest.spec

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1+
%global pkg_name libpkgmanifest
2+
3+
%global forgeurl https://github.com/rpm-software-management/%{pkg_name}
4+
15
%global version_major 0
26
%global version_minor 5
37
%global version_patch 8
48

5-
Name: libpkgmanifest
9+
Name: %{pkg_name}
610
Version: %{version_major}.%{version_minor}.%{version_patch}
7-
Release: 1%{?dist}
11+
Release: %{autorelease}
12+
13+
%forgemeta
14+
815
Summary: Library for working with RPM manifests
916
License: LGPL-2.1-or-later
10-
URL: https://github.com/rpm-software-management/libpkgmanifest
11-
Source0: %{url}/archive/%{version}/libpkgmanifest-%{version}.tar.gz
17+
URL: %{forgeurl}
18+
Source: %{forgesource}
1219

1320
%bcond_with clang
1421
%bcond_with docs
@@ -42,45 +49,45 @@ BuildRequires: python3dist(sphinx-rtd-theme)
4249
%endif
4350

4451
%description
45-
libpkgmanifest is a library for parsing and creating RPM manifests.
52+
%{name} is a library for parsing and creating RPM manifests.
4653
It provides a native C++ API and Python bindings.
4754

48-
%files -n libpkgmanifest
49-
%{_libdir}/libpkgmanifest.so.0
55+
%files -n %{name}
56+
%{_libdir}/%{name}.so.0
5057
%license LICENSE
5158

52-
%package -n libpkgmanifest-devel
53-
Summary: Development files for libpkgmanifest
59+
%package -n %{name}-devel
60+
Summary: Development files for %{name}
5461
License: LGPL-2.1-or-later
55-
Requires: libpkgmanifest%{?_isa} = %{version}-%{release}
62+
Requires: %{name}%{?_isa} = %{version}-%{release}
5663

57-
%description -n libpkgmanifest-devel
58-
Development files for libpkgmanifest.
64+
%description -n %{name}-devel
65+
Development files for %{name}.
5966

60-
%files -n libpkgmanifest-devel
61-
%{_includedir}/libpkgmanifest/
62-
%{_libdir}/libpkgmanifest.so
63-
%{_libdir}/pkgconfig/libpkgmanifest.pc
67+
%files -n %{name}-devel
68+
%{_includedir}/%{name}/
69+
%{_libdir}/%{name}.so
70+
%{_libdir}/pkgconfig/%{name}.pc
6471
%license LICENSE
6572

6673
%if %{with python}
67-
%package -n python3-libpkgmanifest
68-
%{?python_provide:%python_provide python3-libpkgmanifest}
69-
Summary: Python 3 bindings for the libpkgmanifest library
74+
%package -n python3-%{name}
75+
%{?python_provide:%python_provide python3-%{name}}
76+
Summary: Python 3 bindings for the %{name} library
7077
License: LGPL-2.1-or-later
71-
Requires: libpkgmanifest%{?_isa} = %{version}-%{release}
78+
Requires: %{name}%{?_isa} = %{version}-%{release}
7279

73-
%description -n python3-libpkgmanifest
74-
Python 3 bindings for the libpkgmanifest library.
80+
%description -n python3-%{name}
81+
Python 3 bindings for the %{name} library.
7582

76-
%files -n python3-libpkgmanifest
77-
%{python3_sitearch}/libpkgmanifest
78-
%{python3_sitearch}/libpkgmanifest-*.dist-info
83+
%files -n python3-%{name}
84+
%{python3_sitearch}/%{name}
85+
%{python3_sitearch}/%{name}-*.dist-info
7986
%license LICENSE
8087
%endif
8188

8289
%prep
83-
%autosetup -p1 -n libpkgmanifest-%{version}
90+
%autosetup -p1 -n %{name}-%{version}
8491

8592
%build
8693
%cmake \

0 commit comments

Comments
 (0)