Accepting request 308449 from devel:languages:perl

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/308449
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Text-Markdown?expand=0&rev=10
This commit is contained in:
Dominique Leuenberger 2015-05-27 10:48:57 +00:00 committed by Git OBS Bridge
commit 219cbade6d
3 changed files with 70 additions and 9 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,13 @@
-------------------------------------------------------------------
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
- add a Debian compatible symlink with update-alternatives
-------------------------------------------------------------------
Fri Dec 9 08:41:49 UTC 2011 - coolo@suse.com

View File

@ -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
@ -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(LWP::Simple)
BuildRequires: perl-macros
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}
# 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,10 +69,16 @@ 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
%clean
%{__rm} -rf %{buildroot}
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)