-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from Ultramarine-Linux/w/dnf5
add: dnf5-default-package-manager
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project pkg { | ||
rpm { | ||
spec = "dnf5-default-package-manager.spec" | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
ultramarine/dnf5-default-package-manager/dnf5-default-package-manager.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
%define debug_package %nil | ||
|
||
Name: dnf5-default-package-manager | ||
Version: 0 | ||
Release: 1%?dist | ||
Summary: Package that sets dnf5 as the default package manager | ||
License: MIT | ||
URL: https://wiki.ultramarine-linux.org/en/usage/um40-dnf5/ | ||
Requires: dnf5 | ||
|
||
%description | ||
This package contains post-install hooks that symlinks %_bindir/dnf | ||
to the new dnf5 binary. | ||
|
||
%prep | ||
cat<<EOF > README | ||
The `%name` package replaces `%_bindir/dnf` and `%_bindir/yum` to | ||
point to `%_bindir/dnf5`. For more information, please visit: | ||
%url | ||
EOF | ||
|
||
%build | ||
|
||
%install | ||
|
||
%posttrans | ||
if [ $1 -gt 1 ]; then | ||
rm %_bindir/{dnf,yum} | ||
ln -s %_bindir/dnf5 /usr/bin/dnf | ||
ln -s %_bindir/dnf5 /usr/bin/yum | ||
fi | ||
|
||
%preun | ||
rm %_bindir/{dnf,yum} | ||
ln -s /usr/bin/dnf-3 /usr/bin/dnf | ||
ln -s %_bindir/dnf-3 /usr/bin/yum | ||
|
||
%triggerin -- dnf | ||
rm %_bindir/{dnf,yum} | ||
ln -s %_bindir/dnf5 /usr/bin/dnf | ||
ln -s %_bindir/dnf5 /usr/bin/yum | ||
|
||
%triggerin -- yum | ||
rm %_bindir/{dnf,yum} | ||
ln -s %_bindir/dnf5 /usr/bin/dnf | ||
ln -s %_bindir/dnf5 /usr/bin/yum | ||
|
||
%files | ||
%doc README | ||
|
||
%changelog | ||
%autochangelog |