-
Notifications
You must be signed in to change notification settings - Fork 26
/
elvis.spec.in
60 lines (49 loc) · 1.4 KB
/
elvis.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
%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}
License: Artistic
Group: Applications/Editors
Vendor: Steve Kirkendall <[email protected]>
Url: https://www.github.com/mbert/elvis/
Source: %{name}-%{version}.tar.gz
%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