Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %define name get-skype
- %define version 2.2.0.35
- %define release %mkrel 4
- %define _instdir %{_datadir}/skype
- %define _langdir %{_instdir}/lang
- %define _avatardir %{_instdir}/avatars
- %define _sounddir %{_instdir}/sounds
- %define tmpdir /tmp/skype-%{version}
- Summary: Downloads and Installs Skype.
- Name: %{name}
- Version: %{version}
- Release: %{release}
- License: Proprietary
- Group: Networking/Instant messaging
- URL: http://www.mageia.org
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
- Buildarch: noarch
- Requires: wget
- Requires: liblcms1
- Requires: libmng1
- Requires: libqtcore4
- Requires: libqtdbus4
- Requires: libqtnetwork4
- Requires: libqtgui4
- Requires: libqtsvg4
- Requires: libqtxml4
- Requires: libxscrnsaver1
- Requires: libxv1
- Requires: libv4l-wrappers
- # The following are lists of filenames (124 in total) placed
- # in text files to save clutter in the spec.
- Source0: avatars.txt
- Source1: sounds.txt
- Source2: langs.txt
- %description
- This is an installer for Skype-%{version}.
- This package does not contain any files as the Skype license does not allow distribution.
- By installing this package you will download and install Skype from skype.com.
- You must accept the Skype EULA before using it.
- Please be patient - this is a 23MB download and may take some time.
- %build
- %pre
- cd /tmp
- wget -nc "http://download.skype.com/linux/skype-%{version}.tar.bz2"
- %install
- rm -rf $RPM_BUILD_ROOT
- install -d -m 0755 %buildroot%{_bindir}
- install -d -m 0755 %buildroot%{_datadir}/applications
- touch %buildroot%{_datadir}/applications/skype.desktop
- install -d -m 0755 %buildroot%{_instdir}
- touch %buildroot%{_instdir}/{skype.desktop,skype,skype.conf,LICENSE,README}
- install -d -m 0755 %buildroot%{_langdir}
- while read line; do
- touch %buildroot%{_langdir}/skype_"$line"
- done < %{SOURCE2}
- install -d -m 0755 %buildroot%{_instdir}/icons
- install -d -m 0755 %buildroot%{_iconsdir}
- touch %buildroot%{_iconsdir}/skype.png
- for i in 16 32 48; do
- touch %buildroot%{_iconsdir}/SkypeBlue_${i}x${i}.png
- touch %buildroot%{_instdir}/icons/SkypeBlue_${i}x${i}.png
- done
- install -d -m 0755 %buildroot%{_avatardir}
- while read line; do
- touch %buildroot%{_avatardir}/"$line"
- done < %{SOURCE0}
- install -d -m 0755 %buildroot%{_sounddir}
- while read line; do
- touch %buildroot%{_sounddir}/"$line"
- done < %{SOURCE1}
- echo "LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so %{_instdir}/skype --resources=%{_instdir}" > %buildroot%{_bindir}/skype && chmod +x %buildroot%{_bindir}/skype
- %post
- cd /tmp
- [[ -f skype-%{version}.tar.bz2 ]] || exit 1
- tar jxf skype-%{version}.tar.bz2
- [[ -d skype-%{version} ]] || exit 1
- #rm -r skype-%{version}.tar.bz2 //In final
- mkdir %{_instdir}
- cp %{tmpdir}/icons/* %{_iconsdir}
- cp %{_iconsdir}/SkypeBlue_48x48.png %{_iconsdir}/skype.png
- cp %{tmpdir}/skype.desktop %{_datadir}/applications/
- mv %{tmpdir}/* %{_datadir}/skype/
- rm -r %{tmpdir}
- %preun
- %clean
- rm -rf $RPM_BUILD_ROOT
- %files
- %defattr(-,root,root)
- %{_bindir}/skype
- %ghost %{_iconsdir}/skype.png
- %ghost %{_iconsdir}/SkypeBlue_*.png
- %ghost %{_datadir}/applications/skype.desktop
- %ghost %{_instdir}
- %changelog
- * Thu Jun 9 2011 barjac <zen25000@zen.co.uk> 2.2.0.35-4.mga1
- - Moved installation to /usr/share instead of /opt
- - Changed group and license
- - Changed temporary dir
- - Changed to wget for d/l
- * Mon Jun 6 2011 barjac <zen25000@zen.co.uk> 2.2.0.35-2.mga1
- - Moved download to %pre to stop install if d/l fails
- * Sun Jun 5 2011 barjac <zen25000@zen.co.uk> 2.2.0.35-1.mga1
- - Changed get-skype version to follow Skype version.
- - Changed URL to directly download only correct version.
- - A copy of the downloaded file is retained in /tmp/skype-%{version} to
- - speed re-installation (unless you clean /tmp)
- * Sat Jun 4 2011 barjac <zen25000@zen.co.uk> 0.2.mga1
- - Now all files are registered in rpm database.
- - lang, avatar and sound filenames supplied in source files.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement