- translate previous change into cpanspec.yml

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Text-Markdown?expand=0&rev=11
This commit is contained in:
Stephan Kulow 2015-05-21 11:09:49 +00:00 committed by Git OBS Bridge
parent eed0eec824
commit 9d14cb9f87
3 changed files with 59 additions and 16 deletions

37
cpanspec.yml Normal file
View File

@ -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

View File

@ -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

View File

@ -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 <div> and <table> 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