first attempt for https://svn.planet-lab.org/ticket/342
[nodeconfig.git] / nodeconfig.spec
index a7ff4cb..93e1d7d 100644 (file)
@@ -40,8 +40,11 @@ reasons these scripts get installed in /var/www/html/PlanetLabConf.
 %setup -q
 
 %build
-echo "There is no build stage for this component."
-echo "All files just need to be installed as is from the codebase."
+EXCLUDE="exclude=kernel* iptables iproute util-vserver*"
+for filein in $(find . -name '*.in') ; do
+    file=$(echo $filein | sed -e "s,\.in$,,")
+    sed -e "s,@EXCLUDE@,$EXCLUDE,g" $filein > $file
+done
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -52,7 +55,7 @@ for dir in boot PlanetLabConf PLCAPI ; do
     mkdir -p $RPM_BUILD_ROOT/var/www/html/$dir
 done
 # let's be conservative and exclude codebase files, though there should not be any
-rsync -a --exclude \*.spec --exclude .svn --exclude CVS ./ $RPM_BUILD_ROOT/var/www/html/
+rsync -a --exclude \*.spec --exclude .svn --exclude \*.in ./ $RPM_BUILD_ROOT/var/www/html/
 
 %clean
 rm -rf $RPM_BUILD_ROOT