Skip to content

Commit

Permalink
spec: Install symlink /usr/bin/git-obs to /usr/libexec/git/obs to mak…
Browse files Browse the repository at this point in the history
…e git-obs available as a git sub-command
  • Loading branch information
dmach committed Oct 11, 2024
1 parent 541b6da commit 0b2f0da
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion contrib/osc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ BuildRequires: diffstat
%if %{with fdupes}
BuildRequires: fdupes
%endif
# needed for git scm tests
# needed for git scm tests and directory ownership of /usr/libexec/git for git-obs symlink
BuildRequires: git-core

Requires: %{use_python_pkg}-cryptography
Expand Down Expand Up @@ -147,6 +147,10 @@ for a general introduction.
%build
%{use_python} setup.py build

# symlink /usr/bin/git-obs to /usr/libexec/git/obs
mkdir -p %{buildroot}%{_libexecdir}/git
ln -s %{_bindir}/git-obs %{buildroot}%{_libexecdir}/git/obs

# write rpm macros
cat << EOF > macros.osc
%%osc_plugin_dir %{osc_plugin_dir}
Expand All @@ -171,6 +175,9 @@ sphinx-build -b man doc .
%install
%{use_python} setup.py install -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix}

# copy git obs sub-command symlink
install -d %{buildroot}%{_libexecdir}/git/obs

# create plugin dirs
install -d %{buildroot}%{osc_plugin_dir}
install -d %{buildroot}%{_sharedstatedir}/osc-plugins
Expand Down Expand Up @@ -212,6 +219,7 @@ install -Dm0644 oscrc.5 %{buildroot}%{_mandir}/man5/oscrc.5

# executables
%{_bindir}/*
%{_libexecdir}/git/obs

# python modules
%{python_sitelib}/osc
Expand Down

0 comments on commit 0b2f0da

Please sign in to comment.