File dmenu.spec of Package dmenu

#
# spec file for package 
#
# Copyright (c) 2013-2026 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           dmenu
Version:	5.4
Release:	0
License:	MIT
Summary:	Dynamic menu by suckless project
Url:		http://tools.suckless.org/dmenu
Group:		TBD
Source:		%{name}-%{version}.tar.gz
Patch0:		dmenu-center-20250407-b1e217b.diff
BuildRequires:	pkgconfig(x11)
BuildRequires:	pkgconfig(freetype2)
BuildRequires:	pkgconfig(xft)
BuildRequires:	pkgconfig(xinerama)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Efficient dynamic menu for X, product of suckless.org project.

%prep
%setup -q
%patch 0 -p1
# comment that BSD part
sed -i '/FREETYPEINC = ${X11INC}\/freetype2/s@^@#@' config.mk


%build
%if %{?suckless_config:1}%{!?suckless_config:0}
%suckless_config
%else
sed -i 's@^PREFIX[?[:blank:]]*=.*@PREFIX = /usr@;s@^CC[?[:blank:]]*=.*@CC = gcc@;s@^CFLAGS[?[:blank:]]*=.*@CFLAGS = -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DVERSION=\\"5.4\\" ${INCS} ${LIBS}@' config.mk
%endif
make %{?_smp_mflags}

%install
%make_install

%files
%defattr(-,root,root)
%doc README LICENSE
%{_bindir}/*
%{_mandir}/*/*

%changelog

openSUSE Build Service is sponsored by