Advertisement
barjac

get-skype4

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