OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 19-Jan-2007 15:19:23
Branch: HEAD Handle: 2007011914192300
Added files:
openpkg-src/vim vimrc
Modified files:
openpkg-src/vim vim.spec
Log:
allow administrators to provide a global configuration in an OpenPKG
style way
Summary:
Revision Changes Path
1.466 +18 -2 openpkg-src/vim/vim.spec
1.1 +4 -0 openpkg-src/vim/vimrc
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/vim/vim.spec
============================================================================
$ cvs diff -u -r1.465 -r1.466 vim.spec
--- openpkg-src/vim/vim.spec 17 Jan 2007 07:59:02 -0000 1.465
+++ openpkg-src/vim/vim.spec 19 Jan 2007 14:19:23 -0000 1.466
@@ -38,7 +38,7 @@
Group: Editor
License: Charityware
Version: %{V_vl}.%{V_pl}
-Release: 20070117
+Release: 20070119
# package options
%option with_x11 no
@@ -52,6 +52,7 @@
# list of sources
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}.tar.bz2
Source2: rc.vim
+Source3: vimrc
Patch0: vim.patch
Patch1: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}/%{V_vl}.001
Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}/%{V_vl}.002
@@ -317,6 +318,12 @@
-e 's;Modified by;Packaged by;' \
vim%{V_vs}/src/version.c
+ # adjust paths to global configuraton files
+ %{l_shtool} subst \
+ -e 's;^/\* \(#define SYS_VIMRC_FILE\).*$;\1
"%{l_prefix}/etc/vim/vimrc";' \
+ -e 's;^/\* \(#define SYS_GVIMRC_FILE\).*$;\1
"%{l_prefix}/etc/vim/gvimrc";' \
+ vim%{V_vs}/src/feature.h
+
%build
# configure package
cd vim%{V_vs}/src
@@ -326,6 +333,7 @@
LDFLAGS="%{l_ldflags}" \
./configure \
--prefix=%{l_prefix} \
+ --with-global-runtime=%{l_prefix}/etc/vim \
--with-modified-by='%{l_openpkg_release}' \
%if "%{with_x11}" == "yes"
--with-x \
@@ -406,8 +414,16 @@
%{l_shtool} install -c -m 755 %{l_value -s -a} \
%{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+ # install default configuration
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/vim
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
+ %{SOURCE vimrc} $RPM_BUILD_ROOT%{l_prefix}/etc/vim/
+
# determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%config %{l_prefix}/etc/vim/vimrc'
%files -f files
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/vim/vimrc
============================================================================
$ cvs diff -u -r0 -r1.1 vimrc
--- /dev/null 2007-01-19 15:16:39 +0100
+++ vimrc 2007-01-19 15:19:23 +0100
@@ -0,0 +1,4 @@
+"##
+"## @l_prefix@/etc/vim/vimrc -- global vim(1) configuration
+"##
+
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]