Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (51 sloc) 1.48 KB
%define name elvis
%define version VERSION
%define release 1
%define serial 1
%define prefix /usr
Summary: Elvis text editor
Name: %{name}
Version: %{version}
Release: %{release}
#Serial: %{serial}
License: Artistic
Group: Applications/Editors
Vendor: Steve Kirkendall <kirkenda@cs.pdx.edu>
Url: https://www.github.com/mbert/elvis/
Source: %{name}-%{version}.tar.gz
#BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Elvis is a text editor, compatible with vi. It has all the usual
extensions (multiple buffers, multiple windows, syntax coloring,
etc.) plus a variety of display modes including "html" and "man".
%prep
%setup -q
%build
export CFLAGS="$RPM_OPT_FLAGS" CPPFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS";
./configure --prefix=%{prefix}
make -j `nproc`
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1 $RPM_BUILD_ROOT/etc/elvis
sed -i "s|>/etc/elvis|>$RPM_BUILD_ROOT/etc/elvis|g" Makefile
echo "Running 'make install'..."
make PREFIX=$RPM_BUILD_ROOT/usr install
echo "Fixing /etc/elvis/README..."
sed -i "s|$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT/etc/elvis/README
%clean
%files
%defattr(-, root, root)
%doc COPYING README.html
%{prefix}/bin/elvis
%{prefix}/bin/elvgdb
%{prefix}/bin/elvtags
%{prefix}/bin/elvfmt
%{prefix}/bin/ref
MANDIR/elvis.1.gz
MANDIR/elvgdb.1.gz
MANDIR/elvtags.1.gz
MANDIR/elvfmt.1.gz
MANDIR/ref.1.gz
%{prefix}/share/elvis/
%dir /etc/elvis
/etc/elvis/README