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 langdir %{_datadir}/skype/lang
- %define avatardir %{_datadir}/skype/avatars
- %define sounddir %{_datadir}/skype/sounds
- %define icondir %{_datadir}/skype/icons
- 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 22MB 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 -m755 %{buildroot}%{_bindir}
- install -d -m755 %{buildroot}%{_datadir}
- install -d -m755 %{buildroot}%{_datadir}/skype/
- touch %{buildroot}%{_datadir}/skype/{skype,skype.conf,LICENSE,README}
- install -d -m755 %{buildroot}%{_datadir}/applications
- touch %{buildroot}%{_datadir}/applications/skype.desktop
- install -d -m755 %{buildroot}%{langdir}
- while read line; do
- touch %{buildroot}%{langdir}/skype_"$line"
- done < %{SOURCE2}
- install -d -m755 %{buildroot}%{_iconsdir}
- touch %{buildroot}%{_iconsdir}/skype.png
- install -d -m 0755 %{buildroot}%{icondir}
- for i in 16 32 48; do
- touch %{buildroot}%{icondir}/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 %{_datadir/skype --resources=%{_datadir}/skype/" > %{_bindir}/skype && chmod +x %{_bindir}/skype
- %post
- rm -f /tmp/skype-%{version}
- tar jxf skype-%{version}.tar.bz2
- rm skype-%{version}.tar.bz2
- cd /tmp/skype-%{version}
- mv skype %{_bindir}
- mkdir %{_datadir}/skype
- mv lang %{_datadir}/skype/
- mv sounds %{_datadir}/skype/
- mv avatars %{_datadir}/skype/
- mv icons/* %{_iconsdir}
- cp %{_iconsdir}/SkypeBlue_48x48.png %{_iconsdir}/skype.png
- mv skype.desktop %{_datadir}/applications/
- mv * %{_datadir}/skype/
- %preun
- %clean
- rm -rf $RPM_BUILD_ROOT
- %files
- %defattr(-,root,root)
- %{_bindir}/skype
- %ghost %{_iconsdir}/skype.png
- %ghost %{_iconsdir}/SkypeBlue_*.png
- %ghost %{langdir}
- %ghost %{avatardir}
- %ghost %{sounddir}
- %ghost %{icondir}
- %ghost %{_datadir}/skype/*
- %ghost %{_datadir}/skype
- %ghost %{_datadir}/applications/skype.desktop
- %changelog
- * 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