Accepting request 308209 from home:Mailaender:branches:devel:languages:perl
the reasoning behind this is that packages.ubuntu.com/markdown contains a /usr/bin/markdown so all the shellscripts assume that is how it is done. Won't work on SUSE, because we install this to /usr/bin/Markdown.pl I went with update-alternatives here, because this is not the only Markdown package in town. There is also markdown_py or others that I don't yet know of you may want to use as a replacement. OBS-URL: https://build.opensuse.org/request/show/308209 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-Markdown?expand=0&rev=10
This commit is contained in:
parent
3d3d687db9
commit
eed0eec824
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 21 09:40:02 UTC 2015 - mailaender@opensuse.org
|
||||
|
||||
- add a Debian compatible symlink with update-alternatives
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 9 08:41:49 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perl-Text-Markdown
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -28,13 +28,13 @@ Source: http://www.cpan.org/authors/id/B/BO/BOBTFISH/%{cpan_name}-%{vers
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: perl(LWP::Simple)
|
||||
BuildRequires: perl(List::MoreUtils)
|
||||
BuildRequires: perl(Module::Build)
|
||||
BuildRequires: perl(Test::Differences)
|
||||
BuildRequires: perl(Test::Exception)
|
||||
BuildRequires: perl(Text::Diff)
|
||||
BuildRequires: perl-macros
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
@ -63,11 +63,24 @@ tags (like <div> and <table> as well).
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
# update-alternatives
|
||||
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}/Markdown.pl 30
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove markdown %{_bindir}/Markdown.pl
|
||||
fi
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes License.text README Readme.text Todo
|
||||
%ghost %{_sysconfdir}/alternatives/markdown
|
||||
%{_bindir}/markdown
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user