File execdir.spec of Package execdir

#
# spec file for package execdir
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

Name:           execdir
Version:        0
Release:        0
Summary:        Execute a command in a specific directory
License:        MIT
URL:            https://github.com/qr243vbi/execdir
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  make
BuildRequires:  gcc-c++
BuildRequires:  lmdb-devel
BuildRequires:  pkg-config


%description
A tool that lets you run a command in a specific directory. It supports shell commands and path aliases. execdir will try to get an alias if the path doesn't exist.

%prep
%setup -q

%build

export "CFLAGS=${CFLAGS:--Wall -Wextra -Werror} -pedantic -O2 $(pkg-config --libs --cflags lmdb)"
gcc execdir.c -o execdir $CFLAGS

%install
install -Dm755 execdir %{buildroot}%{_bindir}/execdir
install -Dm644 execdir %{buildroot}%{_mandir}/man1/execdir.1

%files
%{_bindir}/*
%license LICENSE
%doc README.md
%{_mandir}/man1/*.1*

%changelog
openSUSE Build Service is sponsored by