First draft.
This commit is contained in:
parent
95e2e58d6c
commit
6e01c964cf
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.osc/
|
||||
plan9port
|
||||
|
11
acme.desktop
Normal file
11
acme.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Name=Acme
|
||||
GenericName=Editor
|
||||
Comment=Editor from Plan9
|
||||
Exec=acme
|
||||
Icon=acme
|
||||
Terminal=false
|
||||
StartupNotify=false
|
||||
Categories=Application;Development;TextEditor;
|
4
plan9.sh
Normal file
4
plan9.sh
Normal file
@ -0,0 +1,4 @@
|
||||
export PLAN9=/usr/lib/plan9
|
||||
export PATH=$PATH:$PLAN9/bin
|
||||
export ROOTPATH=$ROOTPATH:$PLAN9/bin
|
||||
export MANPATH=$MANPATH:$PLAN9/man
|
124
plan9port.spec
124
plan9port.spec
@ -17,85 +17,85 @@
|
||||
|
||||
|
||||
Name: plan9port
|
||||
Version: 0.9+git.1736393031.72c26fc0
|
||||
Version: 0+git.1729599097.61e362ad
|
||||
Release: 0
|
||||
Summary: An editor combining the strengths of both vi(m) and sam
|
||||
License: ISC
|
||||
Group: Productivity/Text/Editors
|
||||
URL: https://sr.ht/~martanne/plan9port
|
||||
BuildRequires: git
|
||||
Summary: A port of many Plan 9 libraries and programs to Unix.
|
||||
License: Custom
|
||||
URL: https://swtch.com/plan9port
|
||||
#!RemoteAssetUrl: git+https://git.sr.ht/~mcepl/plan9port#devel
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libtermkey-devel
|
||||
BuildRequires: tre-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: tar
|
||||
Suggests: par_text
|
||||
# ExclusiveArch: x86_64 %%{ix86}
|
||||
%if 0%{?suse_version} > 1550
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-breathe
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: lua54-penlight
|
||||
BuildRequires: lua54-devel
|
||||
BuildRequires: lua54-lpeg
|
||||
Requires: lua54
|
||||
Requires: lua54-lpeg
|
||||
Suggests: lua54-editorconfig-core-lua
|
||||
%else
|
||||
BuildRequires: lua-penlight
|
||||
BuildRequires: lua-devel
|
||||
BuildRequires: lua-lpeg
|
||||
Requires: lua
|
||||
Requires: lua-lpeg
|
||||
Suggests: lua-editorconfig-core-lua
|
||||
Source1: plan9.sh
|
||||
Source2: acme.sh
|
||||
Source3: acme.png
|
||||
Source4: acme.desktop
|
||||
BuildRequires: fuse
|
||||
BuildRequires: git
|
||||
BuildRequires: libXext-devel
|
||||
BuildRequires: libXt-devel
|
||||
# for the codereview script
|
||||
BuildRequires: python3
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: xorg-x11-server
|
||||
Conflicts: 9base
|
||||
%endif
|
||||
|
||||
%description
|
||||
Vis aims to be a modern, legacy free, simple yet efficient editor combining the strengths of both vi(m) and sam.
|
||||
|
||||
It extends vi's modal editing with built-in support for multiple cursors/selections and combines it with sam's structural regular expression based command language.
|
||||
This is a port of many Plan 9 libraries and programs to Unix.
|
||||
|
||||
%prep
|
||||
%setup -q -n plan9port -c -T
|
||||
|
||||
cp -a %{_sourcedir}/plan9port/* .
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fcommon"
|
||||
%configure
|
||||
%make_build debug
|
||||
cp -p %{SOURCE1} .
|
||||
cp -p %{SOURCE2} .
|
||||
cp -p %{SOURCE3} .
|
||||
cp -p %{SOURCE4} .
|
||||
|
||||
sed -e '/^PATH/s!^.*$!PATH=$PLAN9/bin:/bin:%{_prefix}/bin:$PATH export PATH!' %{name}/INSTALL
|
||||
|
||||
%build
|
||||
PLAN9=%{_libdir}/plan9
|
||||
grep --null -l -r '%{_prefix}/local/plan9' | xargs --null sed -i "s!%{_prefix}/local/plan9!%{_libdir}/plan9!g"
|
||||
|
||||
./INSTALL -b
|
||||
install -Dm755 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/plan9.sh
|
||||
|
||||
%if 0%{?suse_version} > 1550
|
||||
make -C doc singlehtml epub
|
||||
cp doc/build/sphinx/singlehtml/{index,VisEditor}.html
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install
|
||||
rm -r %{buildroot}%{_datadir}/doc/plan9port
|
||||
%if 0%{?suse_version} > 1550
|
||||
find doc/build -name \*.htm\*
|
||||
find . -name \*.htm\*
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_prefix}/{%{_lib},share/doc/%{name}}
|
||||
|
||||
cp -p -r . "%{buildroot}%{_libdir}/plan9"
|
||||
cd "%{buildroot}%{_libdir}/plan9"
|
||||
./INSTALL -c -r "%{buildroot}%{_libdir}/plan9"
|
||||
|
||||
# Decompress the plan9 man pages
|
||||
for i in $(find %{buildroot}%{_libdir}/plan9/man -type f -name \*.gz); do
|
||||
gunzip "$i"
|
||||
done
|
||||
|
||||
grep --null -l -r "%{buildroot}%{_libdir}/plan9" | xargs --null sed -i "s@%{buildroot}%{_libdir}/plan9@%{_libdir}/plan9@g" || true
|
||||
grep --null -l -r "/build/plan9port/pkg/%{name}/usr/%{_lib}/plan9" | xargs --null \
|
||||
sed -i "s!/build/plan9port/pkg/%{name}/usr/%{_lib}/plan9!%{_libdir}/plan9!g" || true
|
||||
|
||||
install -Dm755 %{SOURCE2} %{buildroot}%{_bindir}/acme
|
||||
install -Dm644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/acme.png
|
||||
install -Dm644 %{SOURCE4} %{buildroot}%{_datadir}/applications/acme.desktop
|
||||
|
||||
# Clean up
|
||||
cd "%{buildroot}%{_libdir}/plan9"
|
||||
rm -rf .git .gitignore config install.log install.sum configure Makefile INSTALL LICENSE
|
||||
find . -name '.cvsignore' -print0 | xargs -0 rm -f
|
||||
|
||||
# https://en.opensuse.org/openSUSE:Packaging_guidelines#Desktop_files
|
||||
# https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25suse_update_desktop_file
|
||||
%suse_update_desktop_file acme
|
||||
|
||||
%check
|
||||
# According to the debian/rules:
|
||||
# The vim tests harness is not solid, let's skip them for the moment.
|
||||
# Upstream mentioned the possibility of phasing them out entirely.
|
||||
%make_build -C test/core
|
||||
%make_build -C test/lua
|
||||
%make_build -C test/plan9port
|
||||
:
|
||||
|
||||
%files
|
||||
%{_bindir}/plan9port*
|
||||
%{_datadir}/plan9port
|
||||
%{_mandir}/man1/*
|
||||
%doc README.md LICENSE
|
||||
%if 0%{?suse_version} > 1550
|
||||
%doc doc/build/sphinx/epub/VisEditor.epub
|
||||
%doc doc/build/sphinx/singlehtml/VisEditor.html
|
||||
%endif
|
||||
%license LICENSE
|
||||
%doc CHANGES CONTRIBUTORS README.md TODO
|
||||
%{_libdir}/plan9
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user