jitsi/jitsi.spec

130 lines
5 KiB
RPMSpec
Raw Normal View History

2016-03-20 00:49:57 +03:00
%global JAVA_HOME /usr/lib/jvm/java-openjdk
2013-05-27 17:57:35 +04:00
%define debug_package %nil
2020-01-03 01:36:23 +03:00
%define label 5623
2016-03-20 00:49:57 +03:00
%define suffix rolling
2020-01-03 01:36:23 +03:00
%define version 2.11
2013-05-27 17:57:35 +04:00
2013-05-24 21:06:40 +04:00
Name: jitsi
2016-03-20 00:49:57 +03:00
Version: %{version}.%{label}
Release: 1
2013-05-21 13:27:13 +04:00
Summary: Jitsi - Open Source Video Calls and Chat
Group: Communications
2013-05-27 17:57:35 +04:00
License: LGPLv2+
2013-05-21 13:27:13 +04:00
URL: https://www.jitsi.org
2020-01-03 01:36:23 +03:00
#Source: http://download.jitsi.org/jitsi/nightly/src/%{name}-src-%{version}.zip
Source0: https://github.com/jitsi/jitsi/archive/%{label}/%{name}-%{label}.tar.gz
2015-04-15 17:12:14 +03:00
Source1: %{name}.desktop
Source2: %{name}.bak
Patch1: %{name}.sh.patch
2013-05-21 13:27:13 +04:00
BuildRoot: %{_topdir}/buildroot
AutoReqProv: no
2020-01-03 01:36:23 +03:00
BuildRequires: java-devel >= 1.8
2013-05-21 13:27:13 +04:00
BuildRequires: ant
BuildRequires: ant-nodeps
BuildRequires: gzip
BuildRequires: subversion
Requires: java
%description
2013-05-21 13:27:13 +04:00
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.
2013-05-21 13:27:13 +04:00
%prep
2020-01-03 01:36:23 +03:00
%setup -q -n %{name}-%{label}
2015-04-15 17:12:14 +03:00
#patch1
%build
2020-01-03 01:36:23 +03:00
#JAVA_HOME=/usr/lib/jvm/java-openjdk
ant -Dlabel=%{label} rebuild
%install
2013-12-17 03:49:58 +04:00
# create structure dir
mkdir -p -m 0755 %{buildroot}%{_bindir} \
%{buildroot}%{_datadir}/%{name} \
%{buildroot}%{_datadir}/%{name}/lib \
%{buildroot}%{_datadir}/%{name}/lib/bundle \
%{buildroot}%{_datadir}/%{name}/lib/native \
%{buildroot}%{_datadir}/%{name}/sc-bundles \
%{buildroot}%{_docdir}/%{name} \
%{buildroot}%{_mandir}/man1 \
%{buildroot}%{_datadir}/applications \
2015-04-15 17:12:14 +03:00
%{buildroot}%{_datadir}/pixmaps
2013-05-21 13:27:13 +04:00
# copy the documentation
2013-12-17 03:49:58 +04:00
install -Dm0644 resources/install/debian/jitsi.1.tmpl %{buildroot}%{_mandir}/man1/jitsi.1
sed -i -e "s/_PACKAGE_NAME_/jitsi/" %{buildroot}%{_mandir}/man1/%{name}.1
sed -i -e "s/_APP_NAME_/Jitsi/" %{buildroot}%{_mandir}/man1/%{name}.1
gzip %{buildroot}%{_mandir}/man1/%{name}.1
2013-05-21 13:27:13 +04:00
# copy the launcher script
2015-04-15 17:12:14 +03:00
#install -Dm0655 resources/install/debian/jitsi.sh.tmpl %{buildroot}%{_bindir}/%{name}
#sed -i -e "s/_PACKAGE_NAME_/jitsi/" %{buildroot}%{_bindir}/%{name}
install -Dm655 %{SOURCE2} %{buildroot}%{_bindir}/%{name}
2013-05-21 13:27:13 +04:00
# no more libaoss
#sed -i -e "s@export LD_PRELOAD=/usr/lib/libaoss.so@export LD_PRELOAD=/usr/lib/libaoss.so.0@" $RPM_BUILD_ROOT/usr/bin/sip-communicator
2013-08-22 17:38:09 +04:00
#chmod a+x $RPM_BUILD_ROOT/usr/bin/jitsi
2013-05-21 13:27:13 +04:00
# copy the menu icons
2013-12-17 03:49:58 +04:00
install -Dm0644 resources/install/debian/%{name}-32.xpm %{buildroot}%{_datadir}/pixmaps/%{name}-32.xpm
install -Dm0644 resources/install/debian/%{name}-16.xpm %{buildroot}%{_datadir}/pixmaps/%{name}-16.xpm
install -Dm0644 resources/install/debian/%{name}.svg %{buildroot}%{_datadir}/pixmaps/%{name}.svg
2013-08-22 17:38:09 +04:00
2013-05-21 13:27:13 +04:00
# copy the menu entry
2013-12-17 03:49:58 +04:00
install -Dm0644 resources/install/debian/%{name}.desktop.tmpl %{buildroot}%{_datadir}/applications/%{name}.desktop
sed -i -e "s/_PACKAGE_NAME_/jitsi/" %{buildroot}%{_datadir}/applications/%{name}.desktop
sed -i -e "s/_APP_NAME_/Jitsi/" %{buildroot}%{_datadir}/applications/%{name}.desktop
2013-05-21 13:27:13 +04:00
# copy the sc-bundles
2013-12-17 03:49:58 +04:00
install -Dm0644 sc-bundles/*.jar %{buildroot}%{_datadir}/%{name}/sc-bundles/
2013-05-21 13:27:13 +04:00
# remove all slicks
2013-12-17 03:49:58 +04:00
rm -rf %{buildroot}%{_datadir}/%{name}/sc-bundles/*-slick.jar
rm -rf %{buildroot}%{_datadir}/%{name}/sc-bundles/slick*.jar
2013-05-21 13:27:13 +04:00
# copy the os-specific sc-bundles
2013-12-17 03:49:58 +04:00
install -Dm0644 sc-bundles/os-specific/linux/*.jar %{buildroot}%{_datadir}/%{name}/sc-bundles/
2013-05-21 13:27:13 +04:00
# copy the lib jars
2013-12-17 03:49:58 +04:00
cp lib/*.jar %{buildroot}%{_datadir}/%{name}/lib/
cp lib/bundle/* %{buildroot}%{_datadir}/%{name}/lib/bundle/
rm %{buildroot}%{_datadir}/%{name}/lib/bundle/junit.jar
2014-01-20 18:48:06 +04:00
#cp lib/os-specific/linux/*.jar %{buildroot}%{_datadir}/%{name}/lib/
2013-05-21 13:27:13 +04:00
# copy the native libs
2013-12-17 03:49:58 +04:00
%ifarch i386 i586 i686
2015-04-15 17:12:14 +03:00
install -Dm0644 lib/native/linux/* %{buildroot}%{_datadir}/%{name}/lib/native
2013-12-17 03:49:58 +04:00
%else
2015-04-15 17:12:14 +03:00
install -Dm0644 lib/native/linux-64/* %{buildroot}%{_datadir}/%{name}/lib/native
2013-12-17 03:49:58 +04:00
%endif
2012-10-17 08:10:49 +00:00
2013-05-21 13:27:13 +04:00
# copy the resources
2013-12-17 03:49:58 +04:00
install -Dm0644 resources/install/logging.properties %{buildroot}%{_datadir}/%{name}/lib/
install -Dm0644 lib/felix.client.run.properties %{buildroot}%{_datadir}/%{name}/lib/
2012-10-17 08:10:49 +00:00
2013-05-21 13:27:13 +04:00
# Make felix deploy its bundles in ~/.felix/sip-communicator.bin
2013-12-17 03:49:58 +04:00
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
2013-05-21 13:27:13 +04:00
# fix shell script
2013-12-17 03:49:58 +04:00
sed -i -e "s/\/usr\/lib\/jni/\$LIBPATH\/native/" $RPM_BUILD_ROOT/usr/bin/jitsi
sed -i -e "s/\/usr\/share\/java\/jdic\.jar/\$LIBPATH\/jdic_stub\.jar:\$LIBPATH\/jdic-all\.jar/" $RPM_BUILD_ROOT/usr/bin/jitsi
sed -i -e "s/\/usr\/share\/java\/org\.apache\.felix\.framework\.jar/\$LIBPATH\/felix\.jar/" $RPM_BUILD_ROOT/usr/bin/jitsi
sed -i -e "s/\/usr\/share\/java\/org\.apache\.felix\.main\.jar://" $RPM_BUILD_ROOT/usr/bin/jitsi
sed -i -e "s/\/launchutils.jar//" $RPM_BUILD_ROOT/usr/bin/jitsi
2012-10-17 08:10:49 +00:00
%clean
%files
2013-05-21 13:27:13 +04:00
%defattr(-,root,root,-)
2015-02-15 13:38:04 +03:00
%doc %{_mandir}/man*/*
%{_bindir}/%{name}
2015-04-15 17:12:14 +03:00
#{_libdir}/%{name}/*.so
2013-12-17 03:49:58 +04:00
%{_datadir}/%{name}
%{_datadir}/applications/%{name}*
%{_datadir}/pixmaps/%{name}*
2015-02-15 13:38:04 +03:00
2013-05-21 13:27:13 +04:00
%changelog