First draft.
This commit is contained in:
parent
95e2e58d6c
commit
6e01c964cf
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.osc/
|
.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
|
Name: plan9port
|
||||||
Version: 0.9+git.1736393031.72c26fc0
|
Version: 0+git.1729599097.61e362ad
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: An editor combining the strengths of both vi(m) and sam
|
Summary: A port of many Plan 9 libraries and programs to Unix.
|
||||||
License: ISC
|
License: Custom
|
||||||
Group: Productivity/Text/Editors
|
URL: https://swtch.com/plan9port
|
||||||
URL: https://sr.ht/~martanne/plan9port
|
|
||||||
BuildRequires: git
|
|
||||||
#!RemoteAssetUrl: git+https://git.sr.ht/~mcepl/plan9port#devel
|
#!RemoteAssetUrl: git+https://git.sr.ht/~mcepl/plan9port#devel
|
||||||
BuildRequires: libacl-devel
|
Source1: plan9.sh
|
||||||
BuildRequires: libselinux-devel
|
Source2: acme.sh
|
||||||
BuildRequires: libtermkey-devel
|
Source3: acme.png
|
||||||
BuildRequires: tre-devel
|
Source4: acme.desktop
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: fuse
|
||||||
BuildRequires: tar
|
BuildRequires: git
|
||||||
Suggests: par_text
|
BuildRequires: libXext-devel
|
||||||
# ExclusiveArch: x86_64 %%{ix86}
|
BuildRequires: libXt-devel
|
||||||
%if 0%{?suse_version} > 1550
|
# for the codereview script
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3
|
||||||
BuildRequires: python3-breathe
|
BuildRequires: update-desktop-files
|
||||||
BuildRequires: doxygen
|
BuildRequires: xorg-x11-server
|
||||||
BuildRequires: lua54-penlight
|
Conflicts: 9base
|
||||||
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
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Vis aims to be a modern, legacy free, simple yet efficient editor combining the strengths of both vi(m) and sam.
|
This is a port of many Plan 9 libraries and programs to Unix.
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n plan9port -c -T
|
%setup -q -n plan9port -c -T
|
||||||
|
|
||||||
cp -a %{_sourcedir}/plan9port/* .
|
cp -a %{_sourcedir}/plan9port/* .
|
||||||
|
|
||||||
%build
|
cp -p %{SOURCE1} .
|
||||||
export CFLAGS="%{optflags} -fcommon"
|
cp -p %{SOURCE2} .
|
||||||
%configure
|
cp -p %{SOURCE3} .
|
||||||
%make_build debug
|
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
|
%install
|
||||||
%make_install
|
mkdir -p %{buildroot}%{_prefix}/{%{_lib},share/doc/%{name}}
|
||||||
rm -r %{buildroot}%{_datadir}/doc/plan9port
|
|
||||||
%if 0%{?suse_version} > 1550
|
cp -p -r . "%{buildroot}%{_libdir}/plan9"
|
||||||
find doc/build -name \*.htm\*
|
cd "%{buildroot}%{_libdir}/plan9"
|
||||||
find . -name \*.htm\*
|
./INSTALL -c -r "%{buildroot}%{_libdir}/plan9"
|
||||||
%endif
|
|
||||||
|
# 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
|
%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
|
%files
|
||||||
%{_bindir}/plan9port*
|
%license LICENSE
|
||||||
%{_datadir}/plan9port
|
%doc CHANGES CONTRIBUTORS README.md TODO
|
||||||
%{_mandir}/man1/*
|
%{_libdir}/plan9
|
||||||
%doc README.md LICENSE
|
|
||||||
%if 0%{?suse_version} > 1550
|
|
||||||
%doc doc/build/sphinx/epub/VisEditor.epub
|
|
||||||
%doc doc/build/sphinx/singlehtml/VisEditor.html
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user