Advertisement
barjac

get-skype.spec

Jun 9th, 2011
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. %define name get-skype
  2. %define version 2.2.0.35
  3. %define release %mkrel 4
  4. %define _instdir %{_datadir}/skype
  5. %define _langdir %{_instdir}/lang
  6. %define _avatardir %{_instdir}/avatars
  7. %define _sounddir %{_instdir}/sounds
  8. %define tmpdir /tmp/skype-%{version}
  9.  
  10. Summary: Downloads and Installs Skype.
  11. Name: %{name}
  12. Version: %{version}
  13. Release: %{release}
  14. License: Proprietary
  15. Group: Networking/Instant messaging
  16. URL: http://www.mageia.org
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
  18. Buildarch: noarch
  19. Requires: wget
  20. Requires: liblcms1
  21. Requires: libmng1
  22. Requires: libqtcore4
  23. Requires: libqtdbus4
  24. Requires: libqtnetwork4
  25. Requires: libqtgui4
  26. Requires: libqtsvg4
  27. Requires: libqtxml4
  28. Requires: libxscrnsaver1
  29. Requires: libxv1
  30. Requires: libv4l-wrappers
  31.  
  32. # The following are lists of filenames (124 in total) placed
  33. # in text files to save clutter in the spec.
  34. Source0: avatars.txt
  35. Source1: sounds.txt
  36. Source2: langs.txt
  37.  
  38. %description
  39.  
  40. This is an installer for Skype-%{version}.
  41.  
  42. This package does not contain any files as the Skype license does not allow distribution.
  43. By installing this package you will download and install Skype from skype.com.
  44. You must accept the Skype EULA before using it.
  45. Please be patient - this is a 23MB download and may take some time.
  46.  
  47. %build
  48.  
  49. %pre
  50.  
  51. cd /tmp
  52. wget -nc "http://download.skype.com/linux/skype-%{version}.tar.bz2"
  53.  
  54. %install
  55.  
  56. rm -rf $RPM_BUILD_ROOT
  57. install -d -m 0755 %buildroot%{_bindir}
  58. install -d -m 0755 %buildroot%{_datadir}/applications
  59. touch %buildroot%{_datadir}/applications/skype.desktop
  60.  
  61. install -d -m 0755 %buildroot%{_instdir}
  62. touch %buildroot%{_instdir}/{skype.desktop,skype,skype.conf,LICENSE,README}
  63.  
  64. install -d -m 0755 %buildroot%{_langdir}
  65. while read line; do
  66. touch %buildroot%{_langdir}/skype_"$line"
  67. done < %{SOURCE2}
  68.  
  69. install -d -m 0755 %buildroot%{_instdir}/icons
  70. install -d -m 0755 %buildroot%{_iconsdir}
  71. touch %buildroot%{_iconsdir}/skype.png
  72. for i in 16 32 48; do
  73. touch %buildroot%{_iconsdir}/SkypeBlue_${i}x${i}.png
  74. touch %buildroot%{_instdir}/icons/SkypeBlue_${i}x${i}.png
  75. done
  76.  
  77. install -d -m 0755 %buildroot%{_avatardir}
  78. while read line; do
  79. touch %buildroot%{_avatardir}/"$line"
  80. done < %{SOURCE0}
  81.  
  82. install -d -m 0755 %buildroot%{_sounddir}
  83. while read line; do
  84. touch %buildroot%{_sounddir}/"$line"
  85. done < %{SOURCE1}
  86.  
  87. echo "LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so %{_instdir}/skype --resources=%{_instdir}" > %buildroot%{_bindir}/skype && chmod +x %buildroot%{_bindir}/skype
  88.  
  89. %post
  90.  
  91. cd /tmp
  92. [[ -f skype-%{version}.tar.bz2 ]] || exit 1
  93. tar jxf skype-%{version}.tar.bz2
  94. [[ -d skype-%{version} ]] || exit 1
  95. #rm -r skype-%{version}.tar.bz2 //In final
  96. mkdir %{_instdir}
  97. cp %{tmpdir}/icons/* %{_iconsdir}
  98. cp %{_iconsdir}/SkypeBlue_48x48.png %{_iconsdir}/skype.png
  99. cp %{tmpdir}/skype.desktop %{_datadir}/applications/
  100. mv %{tmpdir}/* %{_datadir}/skype/
  101. rm -r %{tmpdir}
  102.  
  103. %preun
  104.  
  105. %clean
  106.  
  107. rm -rf $RPM_BUILD_ROOT
  108.  
  109. %files
  110.  
  111. %defattr(-,root,root)
  112. %{_bindir}/skype
  113. %ghost %{_iconsdir}/skype.png
  114. %ghost %{_iconsdir}/SkypeBlue_*.png
  115. %ghost %{_datadir}/applications/skype.desktop
  116. %ghost %{_instdir}
  117.  
  118. %changelog
  119.  
  120. * Thu Jun 9 2011 barjac <zen25000@zen.co.uk> 2.2.0.35-4.mga1
  121. - Moved installation to /usr/share instead of /opt
  122. - Changed group and license
  123. - Changed temporary dir
  124. - Changed to wget for d/l
  125.  
  126. * Mon Jun 6 2011 barjac <zen25000@zen.co.uk> 2.2.0.35-2.mga1
  127. - Moved download to %pre to stop install if d/l fails
  128.  
  129. * Sun Jun 5 2011 barjac <zen25000@zen.co.uk> 2.2.0.35-1.mga1
  130. - Changed get-skype version to follow Skype version.
  131. - Changed URL to directly download only correct version.
  132. - A copy of the downloaded file is retained in /tmp/skype-%{version} to
  133. - speed re-installation (unless you clean /tmp)
  134.  
  135. * Sat Jun 4 2011 barjac <zen25000@zen.co.uk> 0.2.mga1
  136. - Now all files are registered in rpm database.
  137. - lang, avatar and sound filenames supplied in source files.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement