diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61645a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +perl-support.zip diff --git a/Makefile b/Makefile deleted file mode 100644 index a7085e3..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: vim-perl-support -# $Id$ -NAME := vim-perl-support -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/sources b/sources index e69de29..a11b80b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +aa23b91d3487dd593b64114189b29a28 perl-support.zip diff --git a/vim-perl-support.spec b/vim-perl-support.spec new file mode 100644 index 0000000..8a3c7df --- /dev/null +++ b/vim-perl-support.spec @@ -0,0 +1,131 @@ +Name: vim-perl-support +Version: 3.9.1 +Release: 1%{?dist} +Summary: Perl-IDE for VIM + +Group: Applications/Editors +# according to plugin/perl-support.vim +License: GPLv2 +URL: http://www.vim.org/scripts/script.php?script_id=556 +# curl -o perl-support.zip 'http://www.vim.org/scripts/download_script.php?src_id=9578' +Source0: perl-support.zip +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +BuildArch: noarch + +Requires: vim-enhanced +Requires(post): vim-enhanced +Requires(postun): vim-enhanced + +# optional requirements +# Critique Perl source code for best-practices +Requires: perl(Perl::Critic) +# Parses and beautifies perl source +Requires: perl(Perl::Tidy) + +# the following are not yet available in fedora +# per-line Perl profiler +#Requires: perl(Devel::SmallProf) +# Perl debugger using a Tk GUI +#Requires: perl(Devel::ptkdb) +# Generate Ctags style tags for Perl source code +#Requires: perl(Perl::Tags) +# regular expression analyzer +#Requires: perl(YAPE::Regex::Explain) + + +%define vimfiles %{_datadir}/vim/vimfiles + +%description +Perl Support implements a Perl-IDE for Vim/gVim. It is written to considerably +speed up writing code in a consistent style. This is done by inserting +complete statements, comments, idioms, code snippets, templates, and POD +documentation. Reading perldoc is integrated. Syntax checking, running a +script, running perltidy, running perlcritics, starting a debugger and a +profiler can be done with a keystroke. + + +%prep +%setup -q -c + +# strip out false provides/requires from codesnippets +cat << \EOF > %{name}-prov +#!/bin/sh +%{__perl_provides} $* |\ +sed -re '/perl\((Class|Package)Name/d' +EOF +%define __perl_provides %{_builddir}/%{name}-%{version}/%{name}-prov +chmod +x %{__perl_provides} + +cat << \EOF > %{name}-req +#!/bin/sh +%{__perl_requires} $* |\ +sed -re '/perl\((Class|base)/d' +EOF +%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req +chmod +x %{__perl_requires} + + +%build +# build is empty + + +%install +rm -rf %{buildroot} +install -m 755 -d %{buildroot}%{vimfiles}/doc +install -m 644 -p doc/*.txt %{buildroot}%{vimfiles}/doc +install -m 755 -d %{buildroot}%{vimfiles}/ftplugin +install -m 644 -p ftplugin/*.vim %{buildroot}%{vimfiles}/ftplugin +install -m 755 -d %{buildroot}%{vimfiles}/plugin +install -m 644 -p plugin/*.vim %{buildroot}%{vimfiles}/plugin +install -m 755 -d %{buildroot}%{vimfiles}/perl-support/codesnippets +install -m 644 -p perl-support/codesnippets/* \ + %{buildroot}%{vimfiles}/perl-support/codesnippets +install -m 755 -d %{buildroot}%{vimfiles}/perl-support/templates +install -m 644 -p perl-support/templates/* \ + %{buildroot}%{vimfiles}/perl-support/templates +install -m 755 -d %{buildroot}%{vimfiles}/perl-support/modules +install -m 644 -p perl-support/modules/* \ + %{buildroot}%{vimfiles}/perl-support/modules +install -m 755 -d %{buildroot}%{vimfiles}/perl-support/scripts +install -m 755 -p perl-support/scripts/*.{pl,sh} \ + %{buildroot}%{vimfiles}/perl-support/scripts +install -m 644 -p perl-support/scripts/*.vim \ + %{buildroot}%{vimfiles}/perl-support/scripts +install -m 755 -d %{buildroot}%{vimfiles}/perl-support/wordlists +install -m 644 -p perl-support/wordlists/* \ + %{buildroot}%{vimfiles}/perl-support/wordlists + +%clean +rm -rf %{buildroot} + + +%post +umask 022 +cd %{_datadir}/vim/vimfiles/doc +vim -u NONE -esX -c "helptags ." -c quit +exit 0 + + +%postun +if [ $1 -eq 0 ]; then + umask 022 + cd %{_datadir}/vim/vimfiles/doc + >tags + vim -u NONE -esX -c "helptags ." -c quit +fi +exit 0 + + +%files +%defattr(-,root,root,-) +%doc README.perlsupport perl-support/doc/* perl-support/rc +%{vimfiles}/perl-support +%{vimfiles}/doc/perlsupport.txt +%{vimfiles}/ftplugin/perl.vim +%{vimfiles}/plugin/perl-support.vim + + +%changelog +* Fri Nov 28 2008 Iain Arnell 3.9.1-1 +- create vim-perl-support