]> git.pld-linux.org Git - packages/discount.git/blob - discount.spec
7d437421e18b3ff6df83b11da21bdf1358fb6d39
[packages/discount.git] / discount.spec
1 Summary:        A command-line utility for converting Markdown files into HTML
2 Name:           discount
3 Version:        2.1.8
4 Release:        1
5 License:        BSD
6 Group:          Applications
7 Source0:        http://www.pell.portland.or.us/~orc/Code/discount/%{name}-%{version}.tar.gz
8 # Source0-md5:  fcb1e7a3d19c2e666655fa8a28066e76
9 URL:            http://www.pell.portland.or.us/~orc/Code/discount
10 Patch0:         %{name}-ldconfig.patch
11 Requires:       libmarkdown = %{version}-%{release}
12 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13
14 %description
15 DISCOUNT is an implementation of John Gruber's Markdown language in C.
16 It includes all of the original Markdown features, along with a few
17 extensions, and passes the Markdown test suite.
18
19 %package -n libmarkdown
20 Summary:        A fast implementation of the Markdown language in C
21 Group:          Libraries
22
23 %description -n libmarkdown
24 libmarkdown is the library portion of discount, a fast Markdown
25 language implementation, written in C.
26
27 %package -n libmarkdown-devel
28 Summary:        Development headers for the libmarkdown library
29 Group:          Development/Libraries
30 Requires:       libmarkdown = %{version}-%{release}
31
32 %description -n libmarkdown-devel
33 This package contains development headers and developer-oriented man
34 pages for libmarkdown.
35
36 %prep
37 %setup -q
38 %patch0
39
40 %build
41 # NOTE: not autoconf based configure
42 CC="%{__cc}" \
43 CFLAGS="%{rpmcflags}" \
44 LDFLAGS="%{rpmldflags}" \
45 ./configure.sh \
46         --shared \
47         --prefix=%{_prefix} \
48         --execdir=%{_bindir} \
49         --libdir=%{_libdir} \
50         --mandir=%{_mandir} \
51         --enable-all-features \
52         --with-fenced-code
53
54 %{__make}
55
56 %if %{with tests}
57 %{__make} test
58 %endif
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 %{__make} install.everything \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 # Rename sample programs (names are too generic) and matching man1 pages
66 mv $RPM_BUILD_ROOT%{_bindir}/makepage $RPM_BUILD_ROOT%{_bindir}/discount-makepage
67 mv $RPM_BUILD_ROOT%{_bindir}/mkd2html $RPM_BUILD_ROOT%{_bindir}/discount-mkd2html
68 mv $RPM_BUILD_ROOT%{_bindir}/theme $RPM_BUILD_ROOT%{_bindir}/discount-theme
69 mv $RPM_BUILD_ROOT%{_mandir}/man1/makepage.1 \
70    $RPM_BUILD_ROOT%{_mandir}/man1/discount-makepage.1
71 mv $RPM_BUILD_ROOT%{_mandir}/man1/mkd2html.1 \
72    $RPM_BUILD_ROOT%{_mandir}/man1/discount-mkd2html.1
73 mv $RPM_BUILD_ROOT%{_mandir}/man1/theme.1 \
74    $RPM_BUILD_ROOT%{_mandir}/man1/discount-theme.1
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %post   -n libmarkdown -p /sbin/ldconfig
80 %postun -n libmarkdown -p /sbin/ldconfig
81
82 %files
83 %defattr(644,root,root,755)
84 %attr(755,root,root) %{_bindir}/markdown
85 %attr(755,root,root) %{_bindir}/discount-makepage
86 %attr(755,root,root) %{_bindir}/discount-mkd2html
87 %attr(755,root,root) %{_bindir}/discount-theme
88 %{_mandir}/man1/markdown.1*
89 %{_mandir}/man7/markdown.7*
90 %{_mandir}/man1/discount-*.1*
91 %{_mandir}/man7/mkd-*.7*
92
93 %files -n libmarkdown
94 %defattr(644,root,root,755)
95 %doc README COPYRIGHT CREDITS
96 %attr(755,root,root) %{_libdir}/libmarkdown.so.*.*.*
97 %ghost %{_libdir}/libmarkdown.so.2
98
99 %files -n libmarkdown-devel
100 %defattr(644,root,root,755)
101 %{_libdir}/libmarkdown.so
102 %{_includedir}/mkdio.h
103 %{_mandir}/man3/markdown.3*
104 %{_mandir}/man3/mkd_*.3*
105 %{_mandir}/man3/mkd-*.3*
This page took 0.055624 seconds and 2 git commands to generate.