[otrs-cvs] otrs/scripts auto_build.sh,1.108.2.1,1.108.2.2

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/scripts
In directory lancelot:/tmp/cvs-serv21963/scripts

Modified Files:
      Tag: rel-3_1
	auto_build.sh 
Log Message:
Created separate RPMs for RHEL5 and RHEL6.

Author: mb

Index: auto_build.sh
===================================================================
RCS file: /home/cvs/otrs/scripts/auto_build.sh,v
retrieving revision 1.108.2.1
retrieving revision 1.108.2.2
diff -2 -u -d -r1.108.2.1 -r1.108.2.2
--- auto_build.sh	11 Oct 2012 08:48:01 -0000	1.108.2.1
+++ auto_build.sh	11 Dec 2012 17:05:28 -0000	1.108.2.2
@@ -18,5 +18,5 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 # or see http://www.gnu.org/licenses/agpl.txt.
 # --
@@ -95,16 +95,15 @@
 rm -rf $PACKAGE_DEST_DIR
 mkdir $PACKAGE_DEST_DIR
-mkdir $PACKAGE_DEST_DIR/RPMS
-mkdir $PACKAGE_DEST_DIR/RPMS/suse
-mkdir $PACKAGE_DEST_DIR/RPMS/suse/10.0
-mkdir $PACKAGE_DEST_DIR/RPMS/suse/11.0
-mkdir $PACKAGE_DEST_DIR/RPMS/fedora
-mkdir $PACKAGE_DEST_DIR/RPMS/fedora/4
-mkdir $PACKAGE_DEST_DIR/SRPMS
-mkdir $PACKAGE_DEST_DIR/SRPMS/suse
-mkdir $PACKAGE_DEST_DIR/SRPMS/suse/10.0
-mkdir $PACKAGE_DEST_DIR/SRPMS/suse/11.0
-mkdir $PACKAGE_DEST_DIR/SRPMS/fedora
-mkdir $PACKAGE_DEST_DIR/SRPMS/fedora/4
+mkdir -p $PACKAGE_DEST_DIR/RPMS/fedora/4
+mkdir -p $PACKAGE_DEST_DIR/RPMS/rhel/5
+mkdir -p $PACKAGE_DEST_DIR/RPMS/rhel/6
+mkdir -p $PACKAGE_DEST_DIR/RPMS/suse/10.0
+mkdir -p $PACKAGE_DEST_DIR/RPMS/suse/11.0
+
+mkdir -p $PACKAGE_DEST_DIR/SRPMS/fedora/4
+mkdir -p $PACKAGE_DEST_DIR/SRPMS/rhel/5
+mkdir -p $PACKAGE_DEST_DIR/SRPMS/rhel/6
+mkdir -p $PACKAGE_DEST_DIR/SRPMS/suse/10.0
+mkdir -p $PACKAGE_DEST_DIR/SRPMS/suse/11.0
 
 # --
@@ -267,4 +266,40 @@
 
 # --
+# build RHEL5 rpm
+# --
+echo "Building RHEL5 rpm..."
+cp $ARCHIVE_DIR/scripts/redhat-rpmmacros ~/.rpmmacros || exit 1
+specfile=$PACKAGE_TMP_SPEC
+cat $ARCHIVE_DIR/scripts/rhel5-otrs.spec | sed "s/^Version:.*/Version:      $VERSION/" | sed "s/^Release:.*/Release:      $RELEASE/" > $specfile.tmp
+# replace sourced files
+perl -e "open(SPEC, '< $specfile.tmp');while(<SPEC>){\$spec.=\$_;};open(IN, '< $FILES');while(<IN>){\$i.=\$_;}\$spec=~s/<FILES>/\$i/g;print \$spec;" > $specfile.tmp1
+# replace package description
+perl -e "open(SPEC, '< $specfile.tmp1');while(<SPEC>){\$spec.=\$_;};open(IN, '< $DESCRIPTION');while(<IN>){\$i.=\$_;}\$spec=~s/<DESCRIPTION>/\$i/g;print \$spec;" > $specfile
+$RPM_BUILD -ba --clean $specfile || exit 1;
+rm $specfile || exit 1;
+rm ~/.rpmmacros || exit 1;
+
+mv $SYSTEM_RPM_DIR/*/$PACKAGE*$VERSION*$RELEASE*.rpm $PACKAGE_DEST_DIR/RPMS/rhel/5/
+mv $SYSTEM_SRPM_DIR/$PACKAGE*$VERSION*$RELEASE*.src.rpm $PACKAGE_DEST_DIR/SRPMS/rhel/5/
+
+# --
+# build RHEL6 rpm
+# --
+echo "Building RHEL6 rpm..."
+cp $ARCHIVE_DIR/scripts/redhat-rpmmacros ~/.rpmmacros || exit 1
+specfile=$PACKAGE_TMP_SPEC
+cat $ARCHIVE_DIR/scripts/rhel6-otrs.spec | sed "s/^Version:.*/Version:      $VERSION/" | sed "s/^Release:.*/Release:      $RELEASE/" > $specfile.tmp
+# replace sourced files
+perl -e "open(SPEC, '< $specfile.tmp');while(<SPEC>){\$spec.=\$_;};open(IN, '< $FILES');while(<IN>){\$i.=\$_;}\$spec=~s/<FILES>/\$i/g;print \$spec;" > $specfile.tmp1
+# replace package description
+perl -e "open(SPEC, '< $specfile.tmp1');while(<SPEC>){\$spec.=\$_;};open(IN, '< $DESCRIPTION');while(<IN>){\$i.=\$_;}\$spec=~s/<DESCRIPTION>/\$i/g;print \$spec;" > $specfile
+$RPM_BUILD -ba --clean $specfile || exit 1;
+rm $specfile || exit 1;
+rm ~/.rpmmacros || exit 1;
+
+mv $SYSTEM_RPM_DIR/*/$PACKAGE*$VERSION*$RELEASE*.rpm $PACKAGE_DEST_DIR/RPMS/rhel/6/
+mv $SYSTEM_SRPM_DIR/$PACKAGE*$VERSION*$RELEASE*.src.rpm $PACKAGE_DEST_DIR/SRPMS/rhel/6/
+
+# --
 # stats
 # --
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.