forked from pool/emacs
Implement group games handling
OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=401
This commit is contained in:
parent
b0dad27a79
commit
7ec27f6c56
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 17 09:11:18 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Split off the emacs-games package for score handling (boo#1227737)
|
||||
- Implement setgid based score handling
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 11 09:31:21 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
95
emacs.spec
95
emacs.spec
@ -30,6 +30,7 @@
|
||||
%bcond_with tex4pdf
|
||||
%bcond_with memmmap
|
||||
%bcond_with checks
|
||||
%bcond_without games
|
||||
|
||||
Name: emacs
|
||||
%if %{with checks}
|
||||
@ -74,7 +75,7 @@ BuildRequires: mailutils-devel
|
||||
%endif
|
||||
BuildRequires: makeinfo
|
||||
BuildRequires: ncurses-devel
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%if %{with games}
|
||||
BuildRequires: user(games)
|
||||
%endif
|
||||
BuildRequires: systemd-rpm-macros
|
||||
@ -171,9 +172,10 @@ Requires: etags
|
||||
Requires: mailutils
|
||||
%endif
|
||||
Requires(pre): fileutils
|
||||
%if 0%{?suse_version} >= 1500
|
||||
Requires(pre): group(games)
|
||||
Requires(pre): user(games)
|
||||
%if !0%{?is_opensuse}
|
||||
Suggests: %{name}-games
|
||||
%else
|
||||
Recommends: %{name}-games
|
||||
%endif
|
||||
Source: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz
|
||||
Source1: app-defaults.Emacs
|
||||
@ -315,7 +317,7 @@ Summary: Info files for GNU Emacs
|
||||
Group: Documentation/Other
|
||||
%if 0%{?suse_version} <= 1500
|
||||
Requires(post): %install_info_prereq
|
||||
Requires(preun):%install_info_prereq
|
||||
Requires(preun): %install_info_prereq
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
|
||||
@ -324,11 +326,26 @@ This package contains all the Info files for GNU Emacs. These files can
|
||||
be read online with GNU Emacs. They describe Emacs and some of its
|
||||
modes.
|
||||
|
||||
%package games
|
||||
Requires: emacs = %{version}-%{release}
|
||||
%if %{with games}
|
||||
Requires(pre): group(games)
|
||||
Requires(pre): user(games)
|
||||
Requires(pre): permissions
|
||||
%endif
|
||||
Provides: emacs:%{_localstatedir}/games/emacs
|
||||
Summary: Provides scores for Emacs games
|
||||
Group: Amusements/Games/Other
|
||||
|
||||
%description games
|
||||
This package provides capability to play games for members of the user
|
||||
group called "games".
|
||||
|
||||
%package -n etags
|
||||
Summary: Generate Tag Files for Use with Emacs
|
||||
Group: Development/Tools/Navigators
|
||||
Requires(post): coreutils update-alternatives
|
||||
Requires(preun):coreutils update-alternatives
|
||||
Requires(preun): coreutils update-alternatives
|
||||
Provides: ctags:/usr/bin/etags
|
||||
|
||||
%description -n etags
|
||||
@ -797,14 +814,44 @@ do
|
||||
done
|
||||
%endif
|
||||
|
||||
%if %{with games}
|
||||
%if 0%{?suse_version} >= 1699
|
||||
mkdir -p %{buildroot}%{_datadir}/permissions/permissions.d
|
||||
(cat > %{buildroot}%{_datadir}/permissions/permissions.d/emacs-games) <<-'EOF'
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/update-game-score root:games 02755
|
||||
EOF
|
||||
(cat > %{buildroot}%{_datadir}/permissions/permissions.d/emacs-games.paranoid) <<-'EOF'
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/update-game-score root:games 00755
|
||||
EOF
|
||||
%else
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
|
||||
(cat > %{buildroot}%{_sysconfdir}/permissions.d/emacs-games) <<-'EOF'
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/update-game-score root:games 02755
|
||||
EOF
|
||||
(cat > %{buildroot}%{_sysconfdir}/permissions.d/emacs-games.paranoid) <<-'EOF'
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/update-game-score root:games 00755
|
||||
EOF
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with checks}
|
||||
%check
|
||||
make check
|
||||
%endif
|
||||
|
||||
%if %{with games}
|
||||
%verifyscript games
|
||||
%verify_permissions -e %{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/update-game-score
|
||||
%endif
|
||||
|
||||
%pre
|
||||
test -L usr/bin/emacs && rm -f usr/bin/emacs || true
|
||||
|
||||
%if %{with games}
|
||||
%post games
|
||||
%set_permissions %{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/update-game-score
|
||||
%endif
|
||||
|
||||
%post -n emacs-x11
|
||||
%glib2_gsettings_schema_post
|
||||
|
||||
@ -851,17 +898,12 @@ fi
|
||||
%dir %{_libdir}/emacs/elpa/
|
||||
%dir %{_libexecdir}/emacs/
|
||||
%dir %{_libexecdir}/emacs/%{version}/
|
||||
%dir %{_libexecdir}/emacs/%{version}/*-suse-linux*/
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/hexl
|
||||
%dir %{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/hexl
|
||||
%if %{without mailutils}
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/movemail
|
||||
%endif
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/rcs2log
|
||||
%if 0
|
||||
%attr(04755,games,games) %{_libexecdir}/emacs/%{version}/*-suse-linux*/update-game-score
|
||||
%else
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/update-game-score
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/movemail
|
||||
%endif
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/rcs2log
|
||||
%{_userunitdir}/emacs.service
|
||||
%dir %{_datadir}/doc/packages/emacs/
|
||||
%{_datadir}/doc/packages/emacs/doc
|
||||
@ -3476,6 +3518,21 @@ fi
|
||||
%dir %{_datadir}/emacs/site-lisp/site-start.d/
|
||||
%{_mandir}/man1/*.1%{ext_man}
|
||||
%exclude %{_mandir}/man1/*tags.1%{ext_man}
|
||||
|
||||
%files games
|
||||
%if %{with games}
|
||||
%attr(02755,games,games) %{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/update-game-score
|
||||
%if 0%{?suse_version} >= 1699
|
||||
%attr(0755,root,root) %{_datadir}/permissions/permissions.d/
|
||||
%attr(0644,root,root) %{_datadir}/permissions/permissions.d/emacs-games
|
||||
%attr(0644,root,root) %{_datadir}/permissions/permissions.d/emacs-games.paranoid
|
||||
%else
|
||||
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/emacs-games
|
||||
%config %attr(0644,root,root) %{_sysconfdir}/permissions.d/emacs-games.paranoid
|
||||
%endif
|
||||
%else
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/update-game-score
|
||||
%endif
|
||||
%dir %attr(775,games,games) %{_localstatedir}/games/emacs
|
||||
%attr(660,games,games) %{_localstatedir}/games/emacs/snake-scores
|
||||
%attr(660,games,games) %{_localstatedir}/games/emacs/tetris-scores
|
||||
@ -3483,16 +3540,16 @@ fi
|
||||
%files -n emacs-nox
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/emacs-nox
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-nox*.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/emacs-nox*.pdmp
|
||||
|
||||
%files -n emacs-x11
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/emacs-x11
|
||||
%{_bindir}/emacs-gtk
|
||||
%{_bindir}/emacs-wayland
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-x11*.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-gtk*.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/*-suse-linux*/emacs-wayland*.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/emacs-x11*.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/emacs-gtk*.pdmp
|
||||
%{_libexecdir}/emacs/%{version}/%{_target_cpu}-suse-linux/emacs-wayland*.pdmp
|
||||
%dir %{appDefaultsDir}
|
||||
%{appDefaultsFile}
|
||||
%{_datadir}/applications/emacs*.desktop
|
||||
|
Loading…
Reference in New Issue
Block a user