Changes

From SME Server
Jump to navigationJump to search
367 bytes added ,  21:35, 24 July 2015
Line 156: Line 156:  
  cp $TMPDIR/$PACKAGE-$VERSION.tar.gz ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz
 
  cp $TMPDIR/$PACKAGE-$VERSION.tar.gz ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz
 
  cp $PACKAGE.spec ~/rpmbuild/SPECS/
 
  cp $PACKAGE.spec ~/rpmbuild/SPECS/
 +
 +
##copy a list of files to SOURCES when patches or archives are not in the root folder
 +
ls > /tmp/$PACKAGE-$VERSION
 +
cp -f $(</tmp/$PACKAGE-$VERSION) ~/rpmbuild/SOURCES/
 
   
 
   
 
  # And build
 
  # And build
Line 224: Line 228:  
  rm -f  ~/rpmbuild/SPECS/$PACKAGE.spec ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz ~/rpmbuild/SRPMS/$PACKAGE-$VERSION*.src.rpm
 
  rm -f  ~/rpmbuild/SPECS/$PACKAGE.spec ~/rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz ~/rpmbuild/SRPMS/$PACKAGE-$VERSION*.src.rpm
 
  rm -rf $TMPDIR  ~/$PACKAGE-$VERSION  
 
  rm -rf $TMPDIR  ~/$PACKAGE-$VERSION  
 +
 +
# clean ~/rpmbuild/SOURCES when patches or archives are not in the root folder
 +
cd ~/rpmbuild/SOURCES/
 +
rm -rf $(</tmp/$PACKAGE-$VERSION)
 +
#remove the file list
 +
rm -rf /tmp/$PACKAGE-$VERSION
 
   
 
   
 
  # we give the path where are files
 
  # we give the path where are files

Navigation menu