2013-05-12 21:03:57 +02:00
|
|
|
|
#
|
|
|
|
|
# spec file for package discount
|
|
|
|
|
#
|
2017-02-09 17:16:58 +01:00
|
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-01-12 04:22:06 +01:00
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
2013-01-12 04:22:06 +01:00
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
2013-05-12 21:03:57 +02:00
|
|
|
|
|
|
|
|
|
|
2017-02-09 17:16:58 +01:00
|
|
|
|
%define sover 2
|
2016-05-02 21:15:25 +02:00
|
|
|
|
%bcond_with fenced_code
|
2013-05-12 21:03:57 +02:00
|
|
|
|
Name: discount
|
2017-02-09 17:16:58 +01:00
|
|
|
|
Version: 2.2.2
|
2013-05-12 21:03:57 +02:00
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Markdown text to HTML converter
|
2015-05-22 08:17:47 +02:00
|
|
|
|
License: BSD-3-Clause
|
2013-05-12 21:03:57 +02:00
|
|
|
|
Group: Productivity/Text/Convertors
|
2015-05-22 08:17:47 +02:00
|
|
|
|
Url: http://www.pell.portland.or.us/~orc/Code/discount/
|
2013-05-12 21:03:57 +02:00
|
|
|
|
Source: http://www.pell.portland.or.us/~orc/Code/discount/discount-%{version}.tar.bz2
|
|
|
|
|
Patch1: discount-disable_ldconfig.patch
|
2015-05-22 08:17:47 +02:00
|
|
|
|
Patch2: discount-fix-compile-warings.diff
|
|
|
|
|
BuildRequires: fdupes
|
2016-10-16 17:28:07 +02:00
|
|
|
|
BuildRequires: pkgconfig
|
2017-11-03 10:31:11 +01:00
|
|
|
|
Provides: markdown
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Discount is an implementation of John Gruber’s Markdown text to HTML language
|
|
|
|
|
with some extensions from PHP Markdown Extra, Pandoc, and other implementations
|
|
|
|
|
of Markdown.
|
|
|
|
|
|
2017-02-09 17:16:58 +01:00
|
|
|
|
%package -n libmarkdown%{sover}
|
2013-05-12 21:03:57 +02:00
|
|
|
|
Summary: Markdown text to HTML converter library
|
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
2017-02-09 17:16:58 +01:00
|
|
|
|
%description -n libmarkdown%{sover}
|
2011-01-16 01:17:25 +01:00
|
|
|
|
Discount is an implementation of John Gruber’s Markdown text to HTML language
|
|
|
|
|
with some extensions from PHP Markdown Extra, Pandoc, and other implementations
|
|
|
|
|
of Markdown.
|
|
|
|
|
|
|
|
|
|
%package -n libmarkdown-devel
|
2013-05-12 21:03:57 +02:00
|
|
|
|
Summary: Markdown text to HTML converter library
|
|
|
|
|
Group: Development/Libraries/C and C++
|
2017-02-09 17:16:58 +01:00
|
|
|
|
Requires: libmarkdown%{sover} = %{version}
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
|
|
|
|
%description -n libmarkdown-devel
|
|
|
|
|
Discount is an implementation of John Gruber’s Markdown text to HTML language
|
|
|
|
|
with some extensions from PHP Markdown Extra, Pandoc, and other implementations
|
|
|
|
|
of Markdown.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%patch1
|
2016-10-16 17:28:07 +02:00
|
|
|
|
%patch2
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
./configure.sh \
|
2016-10-16 17:28:07 +02:00
|
|
|
|
--shared \
|
|
|
|
|
--prefix="%{_prefix}" \
|
|
|
|
|
--execdir="%{_bindir}" \
|
|
|
|
|
--confdir="%{_sysconfdir}" \
|
|
|
|
|
--libdir="%{_libdir}" \
|
|
|
|
|
--mandir="%{_mandir}" \
|
2015-05-22 08:17:47 +02:00
|
|
|
|
%if %{with fenced_code}
|
2016-10-16 17:28:07 +02:00
|
|
|
|
--with-fenced-code \
|
2015-05-22 08:17:47 +02:00
|
|
|
|
%endif
|
2016-10-16 17:28:07 +02:00
|
|
|
|
--with-dl=BOTH \
|
|
|
|
|
--enable-all-features
|
2016-05-02 21:15:25 +02:00
|
|
|
|
make %{?_smp_mflags} CFLAGS="%{optflags} -fPIC"
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
|
|
|
|
%install
|
2016-10-16 17:28:07 +02:00
|
|
|
|
make DESTDIR=%{buildroot} install.everything
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
2017-11-03 10:31:11 +01:00
|
|
|
|
%fdupes -s %{buildroot}%{_mandir}/man3
|
2017-02-09 17:16:58 +01:00
|
|
|
|
install -D -p -m 0644 libmarkdown.pc \
|
2017-02-09 17:44:52 +01:00
|
|
|
|
%{buildroot}%{_libdir}/pkgconfig/libmarkdown.pc
|
2015-05-22 08:17:47 +02:00
|
|
|
|
|
|
|
|
|
# update-alternatives
|
|
|
|
|
mv %{buildroot}%{_bindir}/markdown %{buildroot}%{_bindir}/discount-markdown
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/markdown
|
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/markdown %{buildroot}%{_bindir}/markdown
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
update-alternatives \
|
|
|
|
|
--install %{_bindir}/markdown markdown %{_bindir}/discount-markdown 20
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
|
update-alternatives --remove markdown %{_bindir}/discount-markdown
|
|
|
|
|
fi
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
2017-02-09 17:16:58 +01:00
|
|
|
|
%post -n libmarkdown%{sover} -p /sbin/ldconfig
|
|
|
|
|
%postun -n libmarkdown%{sover} -p /sbin/ldconfig
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
|
|
|
|
%files
|
2015-05-22 08:17:47 +02:00
|
|
|
|
%doc COPYRIGHT CREDITS README
|
2011-01-16 01:17:25 +01:00
|
|
|
|
%{_bindir}/makepage
|
|
|
|
|
%{_bindir}/markdown
|
2015-05-22 08:17:47 +02:00
|
|
|
|
%{_bindir}/discount-markdown
|
|
|
|
|
%ghost %{_sysconfdir}/alternatives/markdown
|
2011-01-16 01:17:25 +01:00
|
|
|
|
%{_bindir}/mkd2html
|
|
|
|
|
%{_bindir}/theme
|
2015-05-22 08:17:47 +02:00
|
|
|
|
%{_mandir}/man1/*.1%{ext_man}
|
|
|
|
|
%{_mandir}/man7/markdown.7%{ext_man}
|
|
|
|
|
%{_mandir}/man7/mkd-extensions.7%{ext_man}
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
2017-02-09 17:16:58 +01:00
|
|
|
|
%files -n libmarkdown%{sover}
|
|
|
|
|
%{_libdir}/libmarkdown.so.%{sover}*
|
2011-01-16 01:17:25 +01:00
|
|
|
|
|
|
|
|
|
%files -n libmarkdown-devel
|
|
|
|
|
%{_includedir}/mkdio.h
|
|
|
|
|
%{_libdir}/libmarkdown.so
|
2017-02-09 17:44:52 +01:00
|
|
|
|
%{_libdir}/pkgconfig/libmarkdown.pc
|
2011-01-16 01:17:25 +01:00
|
|
|
|
%{_mandir}/man3/*.3%{ext_man}
|
|
|
|
|
|
2013-05-12 21:03:57 +02:00
|
|
|
|
%changelog
|