-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasciidoctor.spec
49 lines (43 loc) · 1.2 KB
/
asciidoctor.spec
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
Name: asciidoctor
Version: 2.0.23
Release: 2
Summary: Tool to convert AsciiDoc(tor) text files to DocBook, HTML or Unix man pages
License: GPLv2+
Group: Publishing
Url: https://asciidoctor.org/
Source0: https://github.com/asciidoctor/asciidoctor/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: ruby
BuildRequires: rubygems
Requires: ruby
BuildArch: noarch
%description
AsciiDoctor is a text document format for writing short documents, articles,
books and UNIX man pages.
%prep
%autosetup -p1
%build
ln -s asciidoctor.gemspec asciidoctor-%{version}.gemspec
mkdir build
cd build
%gem_build
%install
cd build
%gem_install
cd ..
# The gem install mechanism seems to be broken, so let's
# do it manually
mkdir -p %{buildroot}%{ruby_vendorlibdir}
cp -a lib/* %{buildroot}%{ruby_vendorlibdir}/
# FIXME this is plain wrong, but some stuff (e.g. icewm)
# hardcodes this bogus location because it's what other
# distros do
cp -a data %{buildroot}%{ruby_vendorlibdir}/..
cp -a bin %{buildroot}%{_prefix}
%files
%{_bindir}/asciidoctor
%{ruby_vendorlibdir}/asciidoctor.rb
%{ruby_vendorlibdir}/asciidoctor
%{ruby_vendorlibdir}/../data
%{ruby_gemdir}/cache/*
%optional %{ruby_gemdir}/doc/*
%{ruby_gemdir}/specifications/*