aboutsummaryrefslogtreecommitdiffstats
path: root/resources/install/rpm
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2013-09-17 10:14:05 +0300
committerDamian Minkov <damencho@jitsi.org>2013-09-17 10:14:05 +0300
commitc16dec5bdd45466732a3306fefefbb367fa36dc5 (patch)
treeffae5afbcad461f30aaac7fc1ecc272533dfab30 /resources/install/rpm
parent4f29c797383a321460fe50072c517a7d5e254139 (diff)
downloadjitsi-c16dec5bdd45466732a3306fefefbb367fa36dc5.zip
jitsi-c16dec5bdd45466732a3306fefefbb367fa36dc5.tar.gz
jitsi-c16dec5bdd45466732a3306fefefbb367fa36dc5.tar.bz2
Updates rpm spec and shell script to build the rpm package. Provided by Pavel Tankov.
Diffstat (limited to 'resources/install/rpm')
-rwxr-xr-xresources/install/rpm/SPECS/build-jitsi-rpm.sh104
-rw-r--r--resources/install/rpm/SPECS/jitsi.spec40
2 files changed, 74 insertions, 70 deletions
diff --git a/resources/install/rpm/SPECS/build-jitsi-rpm.sh b/resources/install/rpm/SPECS/build-jitsi-rpm.sh
index 27cbf0b..932df3d 100755
--- a/resources/install/rpm/SPECS/build-jitsi-rpm.sh
+++ b/resources/install/rpm/SPECS/build-jitsi-rpm.sh
@@ -1,70 +1,68 @@
-#!/bin/bash
+#!/bin/bash -x
-if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "-?" || $# -lt 3 ]]; then
- echo "Usage $0 rpmVersion rpmRelease svnRevisionNumber"
- exit 1
-fi
+SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
+#exec > "${0%.*}.log" 2>&1
-rpmVersion=$1
-rpmRelease=$2
-svnRevisionNumber=$3
-latestVersion=`echo $rpmRelease| sed "s/build.[0-9]*/latest/g" `
-#buildNumber=$(echo $rpmRelease | cut -d '.' -f 3,4 -)
-buildNumber=$rpmRelease
+#exec -x
-rpmbuilddir=~/rpmbuild
-SVN_REPO=https://svn.java.net/svn/jitsi~svn/trunk
-
-dashIndex=`expr index $rpmVersion -`
-if [[ $dashIndex != 0 ]]; then
- echo "ERROR: $rpmVersion should not contain the - character."
- echo "A correct rpmVersion is, for example: 1.0"
+if [[ "$1" == "--help" || "$1" == "-h" || "$1" == "-?" || $# -lt 2 ]]; then
+ echo "Usage $0 VERSION BUILD_NUMBER"
exit 1
fi
-dashIndex=`expr index $rpmRelease -`
-if [[ $dashIndex != 0 ]]; then
- echo "ERROR: $rpmRelease should not contain the - character."
- echo "A correct rpmRelease is, for example: alpha3.nightly.build.1234"
- exit 1
-fi
+version=$1
+buildNumber=$2
+# Deletes everything but the newest files matching the specified pattern
+clean_oldies() {
+ pattern="$1"
+ leaveCount="$2"
+
+ fileCount=$(ls -1 $pattern | wc -l)
+ tailCount=$((fileCount - leaveCount))
-if [ ! -d "$rpmbuilddir/SOURCES" ]; then
- mkdir $rpmbuilddir/SOURCES
-fi
-if [ ! -d "$rpmbuilddir/SOURCES/jitsi" ]; then
- cd $rpmbuilddir/SOURCES
- svn --non-interactive checkout $SVN_REPO jitsi
-fi
+ (( $tailCount < 0 )) && tailCount=0
+ ls -t $pattern | tail -$tailCount | xargs rm -f
+}
-cd $rpmbuilddir/SOURCES/jitsi
-svn --non-interactive update --revision $svnRevisionNumber
-exitCode=$?; [[ $exitCode != 0 ]] && exit $exitCode
+cd $SCRIPT_DIR/SOURCES
+
+[[ ! -d jitsi ]] && git clone https://github.com/jitsi/jitsi
+cd jitsi
+git stash
+git pull --rebase
+git stash pop
echo "Creating zip file"
-cd $rpmbuilddir/SOURCES
+cd $SCRIPT_DIR/SOURCES
rm -f jitsi-src*.zip
-zipFileName=jitsi-src-${rpmVersion}-${rpmRelease/./-}.zip
-zip -rq $zipFileName jitsi -x "jitsi/**/.svn/**/*" -x"jitsi/**/.svn/*" -x"jitsi/.svn/*" -x"jitsi/.svn/**/*"
-exitCode=$?; [[ $exitCode != 0 ]] && exit $exitCode
+zipFileName=jitsi-src-${version}-${buildNumber/./-}.zip
+zip -rq $zipFileName jitsi -x 'jitsi/.git/* jitsi/.gitignore'
sed -i \
--e "s@Version:\( *\).*@Version:\1$rpmVersion@" \
--e "s@Release:\( *\).*@Release:\1$rpmRelease@" \
+-e "s@Version:\( *\).*@Version:\1$version@" \
+-e "s@Release:\( *\).*@Release:\1$buildNumber@" \
-e "s@Source0:\( *\).*@Source0:\1http://download.jitsi.org/jitsi/nightly/src/$zipFileName@" \
-e "s@ant -Dlabel=.* rebuild@ant -Dlabel=$buildNumber rebuild@" \
-$rpmbuilddir/SPECS/jitsi.spec
-
-echo "=============[ Building i386 RPM package]============="
-rm -f $rpmbuilddir/RPMS/i386/jitsi*.rpm
-setarch i386 rpmbuild -bb $rpmbuilddir/SPECS/jitsi.spec
-exitCode=$?; [[ $exitCode != 0 ]] && exit $exitCode
-packagename32=jitsi-${rpmVersion}-${rpmRelease}.i386.rpm
-
-echo "=============[ Building x86_64 RPM package]============="
-rm -f $rpmbuilddir/RPMS/x86_64/jitsi*.rpm
-setarch x86_64 rpmbuild -bb $rpmbuilddir/SPECS/jitsi.spec
-exitCode=$?; [[ $exitCode != 0 ]] && exit $exitCode
-packagename64=jitsi-${rpmVersion}-${rpmRelease}.x86_64.rpm
+$SCRIPT_DIR/SPECS/jitsi.spec
+
+rm -f $SCRIPT_DIR/RPMS/i686/jitsi*.rpm
+echo "=============[ Building i686 RPM package ]============="
+# Note! rpmbuild --target is known not to work correctly, so we use setarch
+setarch i686 rpmbuild -bb $SCRIPT_DIR/SPECS/jitsi.spec
+packagename32=jitsi-${version}-${buildNumber}.i686.rpm
+
+rm -f $SCRIPT_DIR/RPMS/x86_64/jitsi*.rpm
+echo "=============[ Building x86_64 RPM package ]============="
+# Note! rpmbuild --target is known not to work correctly, so we use setarch
+setarch x86_64 rpmbuild -bb $SCRIPT_DIR/SPECS/jitsi.spec
+packagename64=jitsi-${version}-${buildNumber}.x86_64.rpm
+
+mkdir -p $SCRIPT_DIR/RPMS/common
+
+cp $SCRIPT_DIR/RPMS/i686/$packagename32 $SCRIPT_DIR/RPMS/common/
+cp $SCRIPT_DIR/RPMS/x86_64/$packagename64 $SCRIPT_DIR/RPMS/common/
+clean_oldies "$SCRIPT_DIR/RPMS/common/jitsi*.rpm" 20
+
+createrepo --database --deltas $SCRIPT_DIR/RPMS/common/
diff --git a/resources/install/rpm/SPECS/jitsi.spec b/resources/install/rpm/SPECS/jitsi.spec
index f9ee674..85ed50a 100644
--- a/resources/install/rpm/SPECS/jitsi.spec
+++ b/resources/install/rpm/SPECS/jitsi.spec
@@ -1,39 +1,37 @@
Name: jitsi
-Version: 1.1
-Release: 4467.10442
+Version: 2.3
+Release: 4831
Summary: Jitsi - Open Source Video Calls and Chat
-Packager: Damian Minkov <damencho@jitsi.org>
+Packager: Pavel Tankov <ptankov@bluejimp.com>
Group: Applications/Internet
License: GNU Lesser General Public License
URL: https://www.jitsi.org
-Source0: http://download.jitsi.org/jitsi/nightly/src/jitsi-src-1.1-4467-10442.zip
+Source0: http://download.jitsi.org/jitsi/nightly/src/jitsi-src-2.3-4831.zip
BuildRoot: %{_topdir}/buildroot
AutoReqProv: no
-BuildRequires: java-devel >= 0:1.5.0
+BuildRequires: java-devel >= 0:1.6
BuildRequires: ant
-BuildRequires: ant-nodeps
BuildRequires: gzip
-BuildRequires: subversion
-Requires: java >= 0:1.5.0
+Requires: java >= 0:1.6
%description
-Jitsi is an audio/video Internet phone and instant messenger that
-supports some of the most popular instant messaging and telephony protocols
-such as SIP, Jabber, AIM/ICQ, MSN, Yahoo! Messenger, Bonjour, RSS and
-counting. Jitsi is completely Open Source / Free Software, and is
-freely available under the terms of the GNU Lesser General Public License.
+Jitsi (formerly SIP Communicator) is an audio/video and chat communicator
+that supports protocols such as SIP, XMPP/Jabber, AIM/ICQ, Windows Live,
+Yahoo! and many other useful features.
+
+%define debug_package %{nil}
%prep
%setup -q -n jitsi
%build
-ant -Dlabel=4467.10442 rebuild
+ant -Dlabel=4831 rebuild
%install
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+[ "$(readlink -f "$RPM_BUILD_ROOT")" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr
@@ -86,7 +84,7 @@ cp sc-bundles/os-specific/linux/*.jar $RPM_BUILD_ROOT/usr/share/jitsi/sc-bundles
cp lib/*.jar $RPM_BUILD_ROOT/usr/share/jitsi/lib/
cp lib/bundle/* $RPM_BUILD_ROOT/usr/share/jitsi/lib/bundle/
rm $RPM_BUILD_ROOT/usr/share/jitsi/lib/bundle/junit.jar
-cp lib/os-specific/linux/*.jar $RPM_BUILD_ROOT/usr/share/jitsi/lib/
+#cp lib/os-specific/linux/*.jar $RPM_BUILD_ROOT/usr/share/jitsi/lib/
# copy the native libs
%ifarch i386 i586 i686
@@ -98,6 +96,7 @@ cp lib/native/linux-64/* $RPM_BUILD_ROOT/usr/share/jitsi/lib/native/
# copy the resources
cp resources/install/logging.properties $RPM_BUILD_ROOT/usr/share/jitsi/lib/
cp lib/felix.client.run.properties $RPM_BUILD_ROOT/usr/share/jitsi/lib/
+cp lib/jitsi-defaults.properties $RPM_BUILD_ROOT/usr/share/jitsi/lib/
# Make felix deploy its bundles in ~/.felix/sip-communicator.bin
sed -i -e "s/felix.cache.profiledir=sip-communicator.bin/felix.cache.profile=sip-communicator.bin/" $RPM_BUILD_ROOT/usr/share/jitsi/lib/felix.client.run.properties
@@ -121,6 +120,13 @@ sed -i -e "s/\/launchutils.jar//" $RPM_BUILD_ROOT/usr/bin/jitsi
%doc %{_mandir}/man*/*
%changelog
+* Fri Sep 13 2013 Pavel Tankov <ptankov@bluejimp.com>
+- Now depends on java >= 0:1.6.
+- Changed the info to conform with the description on the website.
+- Deleted the build requirement on svn because it was long ago
+ taken out of the rpm build procedure.
+- Some other minor adjustments.
+
* Mon Mar 11 2013 Pavel Tankov <ptankov@bluejimp.com>
- Now depends on java >= 0:1.5.0.
@@ -129,7 +135,7 @@ sed -i -e "s/\/launchutils.jar//" $RPM_BUILD_ROOT/usr/bin/jitsi
- Add felix.framework and felix.main dependencies.
- Fix warning about conflicting folders with filesystem package.
-* Thu Mar 23 2011 Pavel Tankov <tankov_pavel@yahoo.com>
+* Wed Mar 23 2011 Pavel Tankov <tankov_pavel@yahoo.com>
- Renamed to the new project name -jitsi
* Mon Apr 19 2010 Pavel Tankov <tankov_pavel@yahoo.com>