%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} %{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo 0-0)}} # /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 %{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} %define debug_package %{nil} %define srcdir %(tr _ - <<< %{name}) Name: mod_markdown Version: 1.0.3 Release: 2%{?dist} Summary: Markdown filter module for Apache HTTPD Server Group: System Environment/Daemons License: ASL 2.0 URL: https://github.com/hamano/apache-mod-markdown Source0: https://github.com/hamano/apache-mod-markdown/archive/master/%{version}/apache-%{name}-%{version}-git20180730.tar.gz # Use an updated version with support for Header and Footer # https://github.com/hamano/apache-mod-markdown/pull/29 Source1: mod_markdown.c Source2: mod_markdown.h Source3: README.md # The Apache config for this module Source4: markdown.conf Source5: 09-markdown.conf BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: pkgconfig(libmarkdown) BuildRequires: httpd-devel BuildRequires: pkgconfig(apr-1) Requires: httpd %description mod_markdown is Markdown filter module for Apache HTTPD Server. %prep %autosetup -p1 -n apache-%{srcdir}-master %__cp -f %{S:1} . %__cp -f %{S:2} . %__cp -f %{S:3} . %__cp -f %{S:4} . %build sed -i "s|1.0.2|1.0.3|" configure.ac autoreconf -vfi %configure \ --with-apxs=%{_bindir}/apxs \ --with-discount=%{_prefix} sed -i "s|/usr/lib$|%{_libdir}|g" Makefile make %{?_smp_mflags} %install %__mkdir_p %{buildroot}%{_httpd_moddir} %__mkdir_p %{buildroot}%{_httpd_modconfdir} %{_libdir}/httpd/build/instdso.sh SH_LIBTOOL='%{_libdir}/apr-1/build/libtool' mod_markdown.la %{buildroot}%{_httpd_moddir} install -D -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_httpd_modconfdir}/09-markdown.conf install -D -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_httpd_confdir}/markdown.conf %files %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog INSTALL README.md %{_httpd_moddir}/%{name}.so %config(noreplace) %{_httpd_confdir}/markdown.conf %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" %config(noreplace) %{_httpd_modconfdir}/09-markdown.conf %endif %changelog * Fri Apr 12 2019 Aram Minasyan 1.0.3-1.el7 - Adapted from mga7 src rpm * Sun Nov 25 2018 kekepower 1.0.3-2.mga7 + Revision: 1334251 - Update 71-mod_markdown.conf - Clean up spec * Sun Nov 25 2018 kekepower 1.0.3-1.mga7 + Revision: 1334182 - imported package apache-mod_markdown