drop and obsolete static and common subpackages
This commit is contained in:
parent
866fdfa488
commit
6361bd7b55
114
pandoc.spec
114
pandoc.spec
|
@ -1,14 +1,12 @@
|
|||
# https://fedoraproject.org/wiki/Packaging:Haskell
|
||||
|
||||
%bcond_without static
|
||||
|
||||
%global pkg_name pandoc
|
||||
|
||||
%bcond_with tests
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: 1.17.0.3
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Conversion between markup formats
|
||||
|
||||
License: GPLv2+
|
||||
|
@ -72,14 +70,9 @@ BuildRequires: ghc-test-framework-hunit-devel
|
|||
BuildRequires: ghc-test-framework-quickcheck2-devel
|
||||
%endif
|
||||
# End cabal-rpm deps
|
||||
%if %{with static}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
Requires(post): %{_sbindir}/update-alternatives
|
||||
Requires(postun): %{_sbindir}/update-alternatives
|
||||
%else
|
||||
# added for F26
|
||||
Obsoletes: pandoc-common < %{version}-%{release}
|
||||
Obsoletes: pandoc-static < %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description
|
||||
Pandoc is a Haskell library for converting from one markup format to another,
|
||||
|
@ -102,30 +95,8 @@ Thus, adding an input or output format requires only adding a reader or writer.
|
|||
For pdf output please also install pandoc-pdf.
|
||||
|
||||
|
||||
%if %{with static}
|
||||
%package common
|
||||
Summary: Common files for %{name}
|
||||
|
||||
%description common
|
||||
This provides the common files for %{name}.
|
||||
|
||||
|
||||
%package static
|
||||
Summary: Static Haskell build
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
Requires(post): %{_sbindir}/update-alternatives
|
||||
Requires(postun): %{_sbindir}/update-alternatives
|
||||
|
||||
%description static
|
||||
This provides a build with Haskell libraries statically linked.
|
||||
%endif
|
||||
|
||||
|
||||
%package -n ghc-%{name}
|
||||
Summary: Haskell %{name} library
|
||||
%if %{with static}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description -n ghc-%{name}
|
||||
This package provides the Haskell %{name} shared library.
|
||||
|
@ -164,29 +135,14 @@ cabal-tweak-flag https False
|
|||
|
||||
|
||||
%build
|
||||
%if %{with static}
|
||||
%define ghc_without_dynamic 1
|
||||
%ghc_bin_build
|
||||
mv dist/build/%{name}/%{name}{,.static}
|
||||
%undefine ghc_without_dynamic
|
||||
%endif
|
||||
%ghc_lib_build
|
||||
|
||||
|
||||
%install
|
||||
%ghc_lib_install
|
||||
%ghc_fix_dynamic_rpath %{pkg_name}
|
||||
%if %{with static}
|
||||
mv %{buildroot}%{_bindir}/%{name}{,.dynamic}
|
||||
install dist/build/%{name}/%{name}.static %{buildroot}%{_bindir}
|
||||
touch %{buildroot}%{_bindir}/%{name}
|
||||
%endif
|
||||
|
||||
rm %{buildroot}%{_datadir}/%{name}-%{version}/{COPYRIGHT,README}
|
||||
%if %{with static}
|
||||
mv %{buildroot}%{_defaultlicensedir}/%{name}{,-common}
|
||||
%endif
|
||||
|
||||
|
||||
ln -s pandoc %{buildroot}%{_bindir}/hsmarkdown
|
||||
|
||||
|
@ -197,48 +153,6 @@ install -m 0644 -p -D man/pandoc.1 %{buildroot}%{_mandir}/man1/pandoc.1
|
|||
%cabal_test
|
||||
|
||||
|
||||
%if %{with static}
|
||||
# avoid rpm ghost keeping pre-alternatives binary around
|
||||
%pre
|
||||
if [ $1 -gt 1 ] ; then
|
||||
if [ -f %{_bindir}/%{name} -a ! -L %{_bindir}/%{name} ]; then
|
||||
rm %{_bindir}/%{name}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
%post
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/%{name} \
|
||||
%{name} %{_bindir}/%{name}.dynamic 70
|
||||
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
%{_sbindir}/update-alternatives --remove %{name} %{_bindir}/%{name}.dynamic
|
||||
fi
|
||||
|
||||
|
||||
# avoid rpm ghost keeping pre-alternatives binary around
|
||||
%pre static
|
||||
if [ $1 -gt 1 ] ; then
|
||||
if [ -f %{_bindir}/%{name} -a ! -L %{_bindir}/%{name} ]; then
|
||||
rm %{_bindir}/%{name}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
%post static
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/%{name} \
|
||||
%{name} %{_bindir}/%{name}.static 30
|
||||
|
||||
|
||||
%postun static
|
||||
if [ $1 -eq 0 ] ; then
|
||||
%{_sbindir}/update-alternatives --remove %{name} %{_bindir}/%{name}.static
|
||||
fi
|
||||
%endif
|
||||
|
||||
|
||||
%post -n ghc-%{name}-devel
|
||||
%ghc_pkg_recache
|
||||
|
||||
|
@ -248,14 +162,9 @@ fi
|
|||
|
||||
|
||||
%files
|
||||
%if %{with static}
|
||||
%ghost %{_bindir}/%{name}
|
||||
%{_bindir}/%{name}.dynamic
|
||||
%else
|
||||
%license COPYING COPYRIGHT
|
||||
%doc BUGS README* changelog
|
||||
%attr(755,root,root) %{_bindir}/%{name}
|
||||
%endif
|
||||
%attr(-,root,root) %{_bindir}/hsmarkdown
|
||||
%attr(644,root,root) %{_mandir}/man1/pandoc.1*
|
||||
|
||||
|
@ -263,29 +172,18 @@ fi
|
|||
%files pdf
|
||||
|
||||
|
||||
%if %{with static}
|
||||
%files common
|
||||
%license COPYING COPYRIGHT
|
||||
%doc BUGS README* changelog
|
||||
%{_datadir}/%{name}-%{version}
|
||||
|
||||
|
||||
%files static
|
||||
%ghost %{_bindir}/%{name}
|
||||
%{_bindir}/%{name}.static
|
||||
%endif
|
||||
|
||||
|
||||
%files -n ghc-%{name} -f ghc-%{name}.files
|
||||
%if %{without static}
|
||||
%license COPYING COPYRIGHT
|
||||
%endif
|
||||
%{_datadir}/%{name}-%{version}
|
||||
|
||||
|
||||
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 8 2017 Jens Petersen <petersen@redhat.com> - 1.17.0.3-4
|
||||
- drop the static and common subpackages
|
||||
|
||||
* Sat Jan 07 2017 Adam Williamson <awilliam@redhat.com> - 1.17.0.3-3
|
||||
- Rebuild for new ghc
|
||||
|
||||
|
|
Loading…
Reference in New Issue