SPECS (AC-branch): vim.spec - simplify by creating build() function

glen glen at pld-linux.org
Fri May 30 06:49:47 CEST 2008


Author: glen                         Date: Fri May 30 04:49:47 2008 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- simplify by creating build() function

---- Files affected:
SPECS:
   vim.spec (1.407.2.16 -> 1.407.2.17) 

---- Diffs:

================================================================
Index: SPECS/vim.spec
diff -u SPECS/vim.spec:1.407.2.16 SPECS/vim.spec:1.407.2.17
--- SPECS/vim.spec:1.407.2.16	Fri May 30 06:42:44 2008
+++ SPECS/vim.spec	Fri May 30 06:49:42 2008
@@ -606,13 +606,26 @@
 %{__autoconf}
 # needed to prevent deconfiguring
 cp -f configure auto
-
 install -d bin
 
+build() {
+	set -x
+	local target=$1
+	shift
+
+	%{__make} distclean
+	%configure \
+		--with-modifiedby="PLD Linux Distribution" \
+		--with-compiledby="PLD Linux Distribution" \
+		"$@"
+
+	%{__make} vim
+	mv -f vim bin/$target
+}
+
 %if %{with static}
-%{__make} distclean
 LDFLAGS="%{rpmldflags} -static"
-%configure \
+build vim.static \
 	--disable-gui \
 	--without-x \
 	--disable-perlinterp \
@@ -625,18 +638,11 @@
 	--disable-multibyte \
 	--with-features=small \
 	--with-tlib="ncurses -ltinfo" \
-	--disable-nls \
-	--with-modifiedby="PLD Linux Distribution" \
-	--with-compiledby="PLD Linux Distribution"
-
-%{__make} vim
-
-mv -f vim bin/vim.static
+	--disable-nls
 LDFLAGS="%{rpmldflags}"
 %endif
 
-%{__make} distclean
-%configure \
+build vim.ncurses \
 	--disable-gui \
 	--without-x \
 	%{!?with_perl:--disable-perlinterp} \
@@ -652,17 +658,10 @@
 	--with-features=huge \
 	--enable-multibyte \
 	--with-tlib="ncurses -ltinfo" \
-	--enable-nls \
-	--with-modifiedby="PLD Linux Distribution" \
-	--with-compiledby="PLD Linux Distribution"
-
-%{__make} vim
-
-mv -f vim bin/vim.ncurses
+	--enable-nls
 
 %if %{with athena}
-%{__make} distclean
-%configure \
+build gvim.athena \
 	--with-features=huge \
 	--enable-gui=athena \
 	--with-x \
@@ -679,18 +678,11 @@
 	--disable-gpm \
 	--without-gnome \
 	--with-tlib="ncurses -ltinfo" \
-	--enable-nls \
-	--with-modifiedby="PLD Linux Distribution" \
-	--with-compiledby="PLD Linux Distribution"
-
-%{__make} vim
-mv -f vim bin/gvim.athena
+	--enable-nls
 %endif
 
-
 %if %{with motif}
-%{__make} distclean
-%configure \
+build gvim.motif
 	--with-features=huge \
 	--enable-gui=motif \
 	--with-x \
@@ -708,17 +700,11 @@
 	--disable-gpm \
 	--without-gnome \
 	--with-tlib="ncurses -ltinfo" \
-	--enable-nls \
-	--with-modifiedby="PLD Linux Distribution" \
-	--with-compiledby="PLD Linux Distribution"
-
-%{__make} vim
-mv -f vim bin/gvim.motif
+	--enable-nls
 %endif
 
 %if %{with gtk}
-%{__make} distclean
-%configure \
+build gvim.gtk \
 	--with-features=huge \
 	--enable-gui=gtk2 \
 	--enable-gtk2-check \
@@ -734,17 +720,11 @@
 	--disable-gpm \
 	--enable-cscope \
 	--with-tlib="ncurses -ltinfo" \
-	--enable-nls \
-	--with-modifiedby="PLD Linux Distribution" \
-	--with-compiledby="PLD Linux Distribution"
-
-%{__make} vim
-mv -f vim bin/gvim.gtk
+	--enable-nls
 %endif
 
 %if %{with gnome}
-%{__make} distclean
-%configure \
+build gvim.gnome \
 	--with-features=huge \
 	--enable-gui=gnome2 \
 	--enable-gtk2-check \
@@ -761,18 +741,12 @@
 	--disable-gpm \
 	--enable-cscope \
 	--with-tlib="ncurses -ltinfo" \
-	--enable-nls \
-	--with-modifiedby="PLD Linux Distribution" \
-	--with-compiledby="PLD Linux Distribution"
-
-%{__make} vim
-mv -f vim bin/gvim.gnome
+	--enable-nls
 %endif
 
 # vim.heavy / gvim.heavy
 %if %{with heavy}
-%{__make} distclean
-%configure \
+build vim.heavy \
 	--with-features=huge \
 	--disable-gui \
 	--without-x \
@@ -783,15 +757,9 @@
 	--disable-gpm \
 	--enable-cscope \
 	--with-tlib="ncurses -ltinfo" \
-	--enable-nls \
-	--with-modifiedby="PLD Linux Distribution" \
-	--with-compiledby="PLD Linux Distribution"
-
-%{__make} vim
-mv -f vim bin/vim.heavy
+	--enable-nls
 
-%{__make} distclean
-%configure \
+build gvim.heavy \
 	--with-features=huge \
 	--enable-gui=gnome2 \
 	--enable-gtk2-check \
@@ -804,15 +772,9 @@
 	--disable-gpm \
 	--enable-cscope \
 	--with-tlib="ncurses -ltinfo" \
-	--enable-nls \
-	--with-modifiedby="PLD Linux Distribution" \
-	--with-compiledby="PLD Linux Distribution"
-
-%{__make} vim
-mv -f vim bin/gvim.heavy
+	--enable-nls
 %endif
 
-
 %{__make} xxd/xxd languages
 
 %install
@@ -1214,6 +1176,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.407.2.17  2008-05-30 04:49:42  glen
+- simplify by creating build() function
+
 Revision 1.407.2.16  2008-05-30 04:42:44  glen
 - deps for vim-heavy
 - hicolor-icon-theme dep already in vim-rt
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/vim.spec?r1=1.407.2.16&r2=1.407.2.17&f=u



More information about the pld-cvs-commit mailing list