public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/sparse] rawhide: Modernize the spec file
@ 2026-11-03 22:05 Michal Schmidt
0 siblings, 0 replies; only message in thread
From: Michal Schmidt @ 2026-11-03 22:05 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/sparse
Branch : rawhide
Commit : bc1a95c557e978343d596be64dccd5e71de99256
Author : Michal Schmidt <mschmidt@redhat.com>
Date : 2026-11-03T13:10:11+01:00
Stats : +27/-33 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/sparse/c/bc1a95c557e978343d596be64dccd5e71de99256?branch=rawhide
Log:
Modernize the spec file
- use %license for LICENSE and one BuildRequires per line
- use %make_build and %make_install macros instead of a local
%make_destdir macro passing variables the upstream Makefile does
not even use (LIBDIR, INCLUDEDIR, PKGCONFIGDIR)
- drop the obsolete %clean section and the manual buildroot cleanup
- convert %define to %global, use an unnumbered Patch tag
- bump release and add changelog entry
---
diff --git a/sparse.spec b/sparse.spec
index 1dcc2c9..0261312 100644
--- a/sparse.spec
+++ b/sparse.spec
@@ -1,29 +1,30 @@
-Name: sparse
+Name: sparse
+Version: 0.6.4
-Version: 0.6.4
+# snapshot/rc suffix of the source tarball, or %%{nil} for a final release
+%global rcver gce1a6720f69e
-# either a rc? or %\{nil\}
-%define rcver gce1a6720f69e
-
-%if "x%{?rcver}" != "x"
-%define build_ver %{version}-%{rcver}
-%define dotrc .%{rcver}
+%if "%{?rcver}" != ""
+%global build_ver %{version}-%{rcver}
+%global dotrc .%{rcver}
%else
-%define build_ver %{version}
-%define dotrc %{nil}
+%global build_ver %{version}
+%global dotrc %{nil}
%endif
-Release: 4%{dotrc}%{?dist}.9
+Release: 4%{dotrc}%{?dist}.10
Summary: A semantic parser of source files
License: MIT
URL: https://sparse.wiki.kernel.org
-BuildRequires: make
-BuildRequires: gcc
-BuildRequires: libxml2-devel gtk2-devel
-BuildRequires: sqlite-devel
-
Source0: https://www.kernel.org/pub/software/devel/sparse/dist/sparse-%{build_ver}.tar.xz
-Patch0: 0001-linearize.c-fix-buffer-overrun-warning-from-fortify.patch
+
+Patch: 0001-linearize.c-fix-buffer-overrun-warning-from-fortify.patch
+
+BuildRequires: gcc
+BuildRequires: make
+BuildRequires: gtk2-devel
+BuildRequires: libxml2-devel
+BuildRequires: sqlite-devel
%description
Sparse is a semantic parser of source files: it's neither a compiler
@@ -45,28 +46,17 @@ Sparse is primarily used in the development and debugging of the Linux kernel.
%autosetup -p1 -n sparse-%{build_ver}
%build
-%define make_destdir \
-make DESTDIR="%{buildroot}" PREFIX="%{_prefix}" \\\
- BINDIR="%{_bindir}" LIBDIR="%{_libdir}" \\\
- INCLUDEDIR="%{_includedir}" PKGCONFIGDIR="%{_libdir}/pkgconfig"
-
-%make_destdir %{?_smp_mflags} CFLAGS="%{optflags}" HAVE_LLVM=no
+%make_build CFLAGS="%{optflags}" HAVE_LLVM=no
%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{_bindir}
-mkdir -p %{buildroot}%{_libdir}
-%make_destdir install HAVE_LLVM=no
+%make_install PREFIX="%{_prefix}" BINDIR="%{_bindir}" MANDIR="%{_mandir}" HAVE_LLVM=no
%check
-make check HAVE_LLVM=no
-
-%clean
-rm -rf %{buildroot}
-make clean
+%make_build check HAVE_LLVM=no
%files
-%doc LICENSE README FAQ
+%license LICENSE
+%doc README FAQ
%{_bindir}/sparse
%{_bindir}/semind
%{_bindir}/cgcc
@@ -75,6 +65,10 @@ make clean
%{_mandir}/man1/*
%changelog
+* Tue Nov 03 2026 Michal Schmidt <mschmidt@redhat.com> - 0.6.4-4.gce1a6720f69e.10
+- Modernize spec: %%license for LICENSE, %%make_build/%%make_install macros
+- Drop obsolete %%clean section and manual buildroot cleanup
+
* Thu Sep 10 2026 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.4-4.gce1a6720f69e.9
- Rebuilt for libxml-2.5.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 22:05 [rpms/sparse] rawhide: Modernize the spec file Michal Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox