2013-05-12 19:03:57 +00:00
|
|
|
|
#
|
|
|
|
|
# spec file for package discount
|
|
|
|
|
#
|
2023-01-06 18:35:49 +00:00
|
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2013-01-12 03:22:06 +00: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 00:17:25 +00:00
|
|
|
|
|
2018-10-17 07:27:02 +00:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-01-12 03:22:06 +00:00
|
|
|
|
#
|
2013-05-12 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
2023-03-25 17:35:52 +00:00
|
|
|
|
%define sover 3
|
2016-05-02 19:15:25 +00:00
|
|
|
|
%bcond_with fenced_code
|
2013-05-12 19:03:57 +00:00
|
|
|
|
Name: discount
|
2023-03-25 17:35:52 +00:00
|
|
|
|
Version: 3.0.0a
|
2013-05-12 19:03:57 +00:00
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Markdown text to HTML converter
|
2015-05-22 06:17:47 +00:00
|
|
|
|
License: BSD-3-Clause
|
2013-05-12 19:03:57 +00:00
|
|
|
|
Group: Productivity/Text/Convertors
|
2021-01-26 09:15:08 +00:00
|
|
|
|
URL: https://www.pell.portland.or.us/~orc/Code/discount/
|
2023-03-25 17:35:52 +00:00
|
|
|
|
Source: https://github.com/Orc/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2013-05-12 19:03:57 +00:00
|
|
|
|
Patch1: discount-disable_ldconfig.patch
|
2015-05-22 06:17:47 +00:00
|
|
|
|
BuildRequires: fdupes
|
2016-10-16 15:28:07 +00:00
|
|
|
|
BuildRequires: pkgconfig
|
2017-11-03 09:31:11 +00:00
|
|
|
|
Provides: markdown
|
2023-03-25 17:35:52 +00:00
|
|
|
|
Requires(preun):update-alternatives
|
|
|
|
|
Requires(postun):update-alternatives
|
2011-01-16 00:17:25 +00: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 16:16:58 +00:00
|
|
|
|
%package -n libmarkdown%{sover}
|
2013-05-12 19:03:57 +00:00
|
|
|
|
Summary: Markdown text to HTML converter library
|
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-01-16 00:17:25 +00:00
|
|
|
|
|
2017-02-09 16:16:58 +00:00
|
|
|
|
%description -n libmarkdown%{sover}
|
2011-01-16 00:17:25 +00: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 19:03:57 +00:00
|
|
|
|
Summary: Markdown text to HTML converter library
|
|
|
|
|
Group: Development/Libraries/C and C++
|
2017-02-09 16:16:58 +00:00
|
|
|
|
Requires: libmarkdown%{sover} = %{version}
|
2011-01-16 00:17:25 +00: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
|
2021-01-26 09:15:08 +00:00
|
|
|
|
%autosetup -p1
|
2011-01-16 00:17:25 +00:00
|
|
|
|
|
|
|
|
|
%build
|
2021-01-26 09:15:08 +00:00
|
|
|
|
CFLAGS="%{optflags}" ./configure.sh \
|
2016-10-16 15:28:07 +00:00
|
|
|
|
--shared \
|
|
|
|
|
--prefix="%{_prefix}" \
|
|
|
|
|
--execdir="%{_bindir}" \
|
|
|
|
|
--confdir="%{_sysconfdir}" \
|
|
|
|
|
--libdir="%{_libdir}" \
|
|
|
|
|
--mandir="%{_mandir}" \
|
2015-05-22 06:17:47 +00:00
|
|
|
|
%if %{with fenced_code}
|
2016-10-16 15:28:07 +00:00
|
|
|
|
--with-fenced-code \
|
2015-05-22 06:17:47 +00:00
|
|
|
|
%endif
|
2016-10-16 15:28:07 +00:00
|
|
|
|
--with-dl=BOTH \
|
2021-01-26 09:15:08 +00:00
|
|
|
|
--pkg-config \
|
2016-10-16 15:28:07 +00:00
|
|
|
|
--enable-all-features
|
2023-01-06 18:35:49 +00:00
|
|
|
|
%make_build
|
2011-01-16 00:17:25 +00:00
|
|
|
|
|
2023-03-25 17:35:52 +00:00
|
|
|
|
%check
|
|
|
|
|
make test
|
|
|
|
|
|
2011-01-16 00:17:25 +00:00
|
|
|
|
%install
|
2016-10-16 15:28:07 +00:00
|
|
|
|
make DESTDIR=%{buildroot} install.everything
|
2011-01-16 00:17:25 +00:00
|
|
|
|
|
2017-11-03 09:31:11 +00:00
|
|
|
|
%fdupes -s %{buildroot}%{_mandir}/man3
|
2017-02-09 16:16:58 +00:00
|
|
|
|
install -D -p -m 0644 libmarkdown.pc \
|
2017-02-09 16:44:52 +00:00
|
|
|
|
%{buildroot}%{_libdir}/pkgconfig/libmarkdown.pc
|
2015-05-22 06:17:47 +00: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 00:17:25 +00:00
|
|
|
|
|
2017-02-09 16:16:58 +00:00
|
|
|
|
%post -n libmarkdown%{sover} -p /sbin/ldconfig
|
|
|
|
|
%postun -n libmarkdown%{sover} -p /sbin/ldconfig
|
2011-01-16 00:17:25 +00:00
|
|
|
|
|
|
|
|
|
%files
|
2021-03-15 08:20:17 +00:00
|
|
|
|
%license COPYRIGHT
|
|
|
|
|
%doc CREDITS README
|
2011-01-16 00:17:25 +00:00
|
|
|
|
%{_bindir}/makepage
|
|
|
|
|
%{_bindir}/markdown
|
2015-05-22 06:17:47 +00:00
|
|
|
|
%{_bindir}/discount-markdown
|
|
|
|
|
%ghost %{_sysconfdir}/alternatives/markdown
|
2011-01-16 00:17:25 +00:00
|
|
|
|
%{_bindir}/mkd2html
|
|
|
|
|
%{_bindir}/theme
|
2018-06-25 09:12:52 +00:00
|
|
|
|
%{_mandir}/man1/*.1%{?ext_man}
|
|
|
|
|
%{_mandir}/man7/markdown.7%{?ext_man}
|
|
|
|
|
%{_mandir}/man7/mkd-extensions.7%{?ext_man}
|
2011-01-16 00:17:25 +00:00
|
|
|
|
|
2017-02-09 16:16:58 +00:00
|
|
|
|
%files -n libmarkdown%{sover}
|
|
|
|
|
%{_libdir}/libmarkdown.so.%{sover}*
|
2011-01-16 00:17:25 +00:00
|
|
|
|
|
|
|
|
|
%files -n libmarkdown-devel
|
|
|
|
|
%{_includedir}/mkdio.h
|
|
|
|
|
%{_libdir}/libmarkdown.so
|
2017-02-09 16:44:52 +00:00
|
|
|
|
%{_libdir}/pkgconfig/libmarkdown.pc
|
2018-06-25 09:12:52 +00:00
|
|
|
|
%{_mandir}/man3/*.3%{?ext_man}
|
2011-01-16 00:17:25 +00:00
|
|
|
|
|
2013-05-12 19:03:57 +00:00
|
|
|
|
%changelog
|