diff --git a/cpanspec.yml b/cpanspec.yml new file mode 100644 index 0000000..330fd37 --- /dev/null +++ b/cpanspec.yml @@ -0,0 +1,37 @@ +--- +#description_paragraphs: 3 +#no_testing: broken upstream +#sources: +# - source1 +# - source2 +#patches: +# foo.patch: -p1 +# bar.patch: +preamble: |- + %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 +#post_prep: |- +# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'` +# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL +post_install: |- + # update-alternatives + mkdir -p %{buildroot}%{_sysconfdir}/alternatives + touch %{buildroot}%{_sysconfdir}/alternatives/markdown + ln -sf %{_sysconfdir}/alternatives/markdown %{buildroot}%{_bindir}/markdown + + echo "%ghost %{_sysconfdir}/alternatives/markdown" >> %{name}.files + echo "%{_bindir}/markdown" >> %{name}.files + +#license: SUSE-NonFree +#skip_noarch: 1 +#custom_build: |- +#./Build build flags=%{?_smp_mflags} --myflag +#custom_test: |- +#startserver && make test +#ignore_requires: Bizarre::Module diff --git a/perl-Text-Markdown.changes b/perl-Text-Markdown.changes index b39c8ca..756b2fe 100644 --- a/perl-Text-Markdown.changes +++ b/perl-Text-Markdown.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 21 11:09:35 UTC 2015 - coolo@suse.com + +- translate previous change into cpanspec.yml + ------------------------------------------------------------------- Thu May 21 09:40:02 UTC 2015 - mailaender@opensuse.org diff --git a/perl-Text-Markdown.spec b/perl-Text-Markdown.spec index 6ef8a4f..b32d892 100644 --- a/perl-Text-Markdown.spec +++ b/perl-Text-Markdown.spec @@ -24,18 +24,26 @@ Summary: Convert Markdown syntax to (X)HTML License: BSD-3-Clause Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Text-Markdown/ -Source: http://www.cpan.org/authors/id/B/BO/BOBTFISH/%{cpan_name}-%{version}.tar.gz +Source0: http://www.cpan.org/authors/id/B/BO/BOBTFISH/%{cpan_name}-%{version}.tar.gz +Source1: cpanspec.yml 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) %{perl_requires} +# MANUAL BEGIN +%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 +# MANUAL END %description Markdown is a text-to-HTML filter; it translates an easy-to-read / @@ -61,26 +69,19 @@ tags (like
and as well). %install %perl_make_install %perl_process_packlist -%perl_gen_filelist - +# MANUAL BEGIN # 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 +echo "%ghost %{_sysconfdir}/alternatives/markdown" >> %{name}.files +echo "%{_bindir}/markdown" >> %{name}.files +# MANUAL END +%perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes License.text README Readme.text Todo -%ghost %{_sysconfdir}/alternatives/markdown -%{_bindir}/markdown %changelog