[projects/template-specs] - adjusted noarch subpackage rules and some descriptions, more pl
qboosh
qboosh at pld-linux.org
Thu Nov 26 18:00:31 CET 2020
commit 09ee490b9341053ed93cc56bff608305ff469d01
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Nov 26 18:00:33 2020 +0100
- adjusted noarch subpackage rules and some descriptions, more pl
golang-package.spec | 9 ++++-----
java.spec | 14 ++++++++++----
lib.spec | 6 +++---
python-ext.spec | 10 +++++-----
python3-ext.spec | 10 +++++-----
template.spec | 7 +++----
6 files changed, 30 insertions(+), 26 deletions(-)
---
diff --git a/golang-package.spec b/golang-package.spec
index ae3428f..bafb1b9 100644
--- a/golang-package.spec
+++ b/golang-package.spec
@@ -15,6 +15,8 @@ Source0: %{name}-%{version}.tar.gz
# Source0-md5: -
URL: -
BuildRequires: golang >= 1.3.1
+# if using noarchpackage
+#BuildRequires: rpmbuild(macros) >= 1.752
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _enable_debug_packages 0
@@ -30,10 +32,7 @@ Summary: %{summary}
Group: Development/Languages
#Requires: golang(github.com/../...)
Provides: golang(%{import_path}) = %{version}-%{release}
-# noarch subpackages only when supported by rpm
-%if "%{_rpmversion}" >= "4.6"
-BuildArch: noarch
-%endif
+%{?noarchpackage}
%description devel
%{summary}
@@ -49,7 +48,7 @@ ln -s ../../.. src/%{import_path}
# alternative
install -d src/$(dirname %{import_path})
-mv %{name}-%{version} src/%{import_path}
+%{__mv} %{name}-%{version} src/%{import_path}
%build
export GOPATH=$(pwd)
diff --git a/java.spec b/java.spec
index 0b05110..a53be0c 100644
--- a/java.spec
+++ b/java.spec
@@ -35,6 +35,8 @@ BuildRequires: glibc-localedb-all
BuildRequires: jpackage-utils
BuildRequires: rpm-javaprov
BuildRequires: rpmbuild(macros) >= 1.745
+# if using noarchpackage, replace with
+#BuildRequires: rpmbuild(macros) >= 1.752
BuildRequires: sed >= 4.0
# for %{_javadir}
Requires: jpackage-utils
@@ -51,10 +53,7 @@ Summary(fr.UTF-8): Documentation pour %{srcname}
Summary(it.UTF-8): Documentazione di %{srcname}
Summary(pl.UTF-8): Podręcznik dla %{srcname}
Group: Documentation
-# noarch subpackages only when supported by rpm
-%if "%{_rpmversion}" >= "4.6"
-BuildArch: noarch
-%endif
+%{?noarchpackage}
%description doc
Documentation for %{srcname}.
@@ -73,6 +72,7 @@ Summary: Online manual for %{srcname}
Summary(pl.UTF-8): Dokumentacja online do %{srcname}
Group: Documentation
Requires: jpackage-utils
+%{?noarchpackage}
%description javadoc
Documentation for %{srcname}.
@@ -97,16 +97,22 @@ Pliki demonstracyjne i przykłady dla pakietu %{srcname}.
%package manual
Summary: Tutorial for %{srcname}
+Summary(pl.UTF-8): Podręcznik do pakietu %{srcname}
Group: Documentation
+%{?noarchpackage}
%description manual
Manual for %{srcname}.
+%description manual -l pl.UTF-8
+Podręcznik do pakietu %{srcname}.
+
%package source
Summary: Source code of %{srcname}
Summary(pl.UTF-8): Kod źródłowy %{srcname}
Group: Documentation
Requires: jpackage-utils >= 1.7.5-2
+%{?noarchpackage}
%description source
Source code of %{srcname}.
diff --git a/lib.spec b/lib.spec
index 4efa5d5..404a2b1 100644
--- a/lib.spec
+++ b/lib.spec
@@ -19,6 +19,8 @@ Source0: %{name}-%{version}.tar.gz
#BuildRequires: automake
#BuildRequires: intltool
#BuildRequires: libtool
+# if using noarchpackage:
+#BuildRequires: rpmbuild(macros) >= 1.752
#Requires(postun): -
#Requires(pre,post): -
#Requires(preun): -
@@ -89,9 +91,7 @@ Summary: API documentation for %{name} library
Summary(pl.UTF-8): Dokumentacja API biblioteki %{name}
Group: Documentation
# if not arch-dependent
-%if "%{_rpmversion}" >= "4.6"
-BuildArch: noarch
-%endif
+%{?noarchpackage}
%description apidocs
API documentation for %{name} library.
diff --git a/python-ext.spec b/python-ext.spec
index 8b71f2c..fdebbed 100644
--- a/python-ext.spec
+++ b/python-ext.spec
@@ -4,8 +4,8 @@
# use template-specs/python3-ext.spec for python3 only packages
#
# Conditional build:
-%bcond_without doc # don't build doc
-%bcond_without tests # do not perform "make test"
+%bcond_without doc # API documentation
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
@@ -41,6 +41,8 @@ BuildRequires: python3-devel >= 1:3.2
BuildRequires: rpm-pythonprov
# for the py_build, py_install macros
BuildRequires: rpmbuild(macros) >= 1.714
+# if using noarchpackage, replace with:
+#BuildRequires: rpmbuild(macros) >= 1.752
# when using /usr/bin/env or other in-place substitutions
#BuildRequires: sed >= 4.0
%if %{with doc}
@@ -68,9 +70,7 @@ Requires: python3-modules >= 1:3.2
Summary: %{module} API documentation
Summary(pl.UTF-8): Dokumentacja API %{module}
Group: Documentation
-%if "%{_rpmversion}" >= "4.6"
-BuildArch: noarch
-%endif
+%{?noarchpackage}
%description apidocs
API documentation for %{module}.
diff --git a/python3-ext.spec b/python3-ext.spec
index 57d323f..8ca05bc 100644
--- a/python3-ext.spec
+++ b/python3-ext.spec
@@ -3,8 +3,8 @@
# use template-specs/python3.spec for pure python packages
#
# Conditional build:
-%bcond_without doc # don't build doc
-%bcond_without tests # do not perform "make test"
+%bcond_without doc # API documentation
+%bcond_without tests # unit tests
%define module template
Summary: -
@@ -27,6 +27,8 @@ URL: -
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
+# if using noarchpackage, replace with:
+#BuildRequires: rpmbuild(macros) >= 1.752
BuildRequires: python3-devel >= 1:3.2
# when using /usr/bin/env or other in-place substitutions
#BuildRequires: sed >= 4.0
@@ -45,9 +47,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary: %{module} API documentation
Summary(pl.UTF-8): Dokumentacja API %{module}
Group: Documentation
-%if "%{_rpmversion}" >= "4.6"
-BuildArch: noarch
-%endif
+%{?noarchpackage}
%description apidocs
API documentation for %{module}.
diff --git a/template.spec b/template.spec
index e181339..6e64c3e 100644
--- a/template.spec
+++ b/template.spec
@@ -18,6 +18,8 @@ Source0: %{name}-%{version}.tar.gz
# Source1-md5: -
#Patch0: %{name}-DESTDIR.patch
URL: -
+# if using noarchpackage macro
+#BuildRequires: rpmbuild(macros) >= 1.752
%if %{with initscript}
BuildRequires: rpmbuild(macros) >= 1.228
Requires(post,preun): /sbin/chkconfig
@@ -54,10 +56,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary: -
Summary(pl.UTF-8): -
Group: -
-# noarch subpackages only when supported by rpm
-%if "%{_rpmversion}" >= "4.6"
-BuildArch: noarch
-%endif
+%{?noarchpackage}
%description subpackage
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/09ee490b9341053ed93cc56bff608305ff469d01
More information about the pld-cvs-commit
mailing list