Advertisement
ngpbento

PKGBUILD

Nov 27th, 2011
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.40 KB | None | 0 0
  1. # Contributor: Prurigro
  2. # Maintainer: Anish
  3. # Patches/Fixes created from efforts by prurigro, sdnick484, jaydonoghue, anish, jpf, vrtladept, paulingham, bralkein, wonder, Slash and others! (contact us if your work is here but you aren't mentioned)
  4. # fribidi.patch fixes an issue where some people were having missing file issues related to the fribidi library
  5. # gcc44.patch helps boxee compile on gcc 4.4
  6. # boxee64.patch addresses a number of problems getting boxee to compile and run smoothly on x86_64
  7. # flashlib.patch allows flashlib to compile, allowing us to get a little closer to a built-from-source flash solution. this is turned off for now
  8. # libpng.patch helps compile against libpng1.4
  9. # 12563_fix removes extraneous function calls that wont let boxee compile
  10. # pkgdesc from wikipedia :)
  11.  
  12. pkgname=boxee-source
  13. pkgver=0.9.23.15885
  14. _flashlib_pkgver=6684
  15. pkgrel=3
  16. pkgdesc="A freeware cross-platform media center software with social networking features that is a fork of the open source XBMC media center"
  17. arch=('i686' 'x86_64')
  18. license=( 'GPL' )
  19. depends=('php' 'glew' 'hal' 'jasper' 'libcdio' 'sdl_image' 'sdl_mixer' 'sdl_gfx' 'sdl_sound' 'fribidi' 'libmad' 'lzo2' 'unrar' 'smbclient' 'streamripper' 'python-pysqlite' 'curl' 'gawk' 'pmount' 'libmysqlclient' 'dbus' 'bzip2' 'boost' 'faac' 'enca' 'gperf' 'unzip' 'tre' 'screen' 'bison' 'libsamplerate' 'zip' 'libmms' 'libvdpau' 'libxtst' 'libxrandr' 'fontconfig' 'libxinerama' 'python24')
  20. makedepends=( 'boost' 'cmake' 'nasm' 'coreutils' 'rsync' 'glew')
  21. options=('!makeflags')
  22. url="http://www.boxee.tv/"
  23. install='boxee-source.install'
  24. source=(http://dl.boxee.tv/boxee-sources-$pkgver.tar.bz2
  25. boxee.desktop
  26. smbno.h
  27. fribidi.patch
  28. boxee64.patch
  29. anish.patch
  30. libpng.patch
  31. ffmpeg64.patch
  32. 12563_fix.patch
  33. libmms.patch
  34. mysql_fix.patch
  35. samba.patch
  36. gcc4.6_soname.patch)
  37. md5sums=('36284eee3cb1db776b78e594865aa7b6'
  38. 'dcad8a3955ea2742a6dccb23e6b665ef'
  39. '3e53f9a60344dad366b230fb2ac876ec'
  40. 'b9ff2928d707321c96ef1ad792c14dda'
  41. '3241498186d95a5aafd4d2a6947c764f'
  42. 'a07e311b6da020f7e6847d249cf08b66'
  43. 'fbed461ece6620d2c31da1169d9744d3'
  44. '4ad256054dbc6739fbe5591aac5777d7'
  45. 'de21425ae087313e2898aa5edaeda14b'
  46. 'cff658ec51e4fe7cfb94700ae689970f'
  47. 'da4c26bf1a0b3c55ed5b773d025d45fb'
  48. 'a28c4cf86d1eba78d7f66bdbc4dafcf0'
  49. '2a7ab4c9a051b4caf17e1e6c0cabe861')
  50.  
  51. _src=${srcdir}/boxee-sources-"$pkgver"
  52.  
  53. build() {
  54. pushd ${_src} || return 1
  55. #this section contains changes required for x86_64 and thus is only loaded if your arch is x86_64
  56. if [ $(uname -m) = "x86_64" ]; then
  57. #boxee64.patch allows boxee to compile on 64bit systems
  58. patch -p0 < ../boxee64.patch || return 1
  59. #ffmpeg needs to be patched for 64bit systems
  60. patch -p0 < ../ffmpeg64.patch || return 1
  61.  
  62. #two symlinks added by paulingham that work with boxee64.patch to allow boxee to compile on x86_64
  63. pushd xbmc/lib/libsmb || return 1
  64. ln -s /usr/lib/libtalloc.so.1 libtalloc-x86_64-linux.a
  65. ln -s /usr/lib/libwbclient.so.0 libwbclient-x86_64-linux.a
  66. popd || return 1
  67. _xulrunner=xulrunner-x86_64-linux
  68. else
  69. _xulrunner=xulrunner-i486-linux
  70. fi || return 1
  71.  
  72.  
  73. #anish.patch adds some minor tweaks anish figured out to get the latest sources running
  74. patch -p0 < ../anish.patch || return 1
  75.  
  76. #fribidi.patch fixes the compile issue related to fribidi (big thanks to vrtladept and anish for getting this one rolling)
  77. patch -p0 < ../fribidi.patch || return 1
  78.  
  79. #patch to compile against libpng14, thanks to wonder for providing the original patch
  80. patch -p0 < ../libpng.patch || return 1
  81.  
  82. #patch to compilet release 0.9.21.12563, remove extraneous function calls that cause linkage failure
  83. patch -p0 < ../12563_fix.patch || return 1
  84.  
  85. #patch to fix libmms
  86. patch -p0 < ../libmms.patch || return 1
  87.  
  88. #thank the fedora guys for this
  89. patch -p1 < ../mysql_fix.patch || return 1
  90.  
  91. #smbno.h was deprecated in the kernel, the boxee guys leave us hanging as usual
  92. patch -p0 < ../samba.patch || return 1
  93. cp ../smbno.h xbmc/cores/paplayer/MACDll/Source/MACLib/. || return 1
  94.  
  95.  
  96. patch -p3 < ../gcc4.6_soname.patch
  97.  
  98.  
  99. #tinyxpath and goom need to be reconfigured so they link against the correct utilities (another thanks to anish for this one)
  100. pushd xbmc/lib/libBoxee/tinyxpath || return 1
  101. autoreconf -vif || return 1
  102. ./configure || return 1
  103. popd || return 1
  104.  
  105. pushd xbmc/visualizations/Goom/goom2k4-0 || return 1
  106. aclocal || return 1
  107. libtoolize --copy --force || return 1
  108. ./autogen.sh --enable-static --with-pic || return 1
  109. popd || return 1
  110.  
  111. #thanks to bralkein
  112. pushd xbmc/lib/libass/ || return 1
  113. autoreconf --install || return 1
  114. popd || return 1
  115.  
  116. aclocal || return 1
  117. autoheader || return 1
  118. autoconf || return 1
  119. #if anyone wants pulseaudio, simply remove "--disable-pulse"
  120. ./configure --prefix=/opt/boxee --enable-mid --disable-debug --disable-pulse --enable-xrandr --disable-ccache --enable-vdpau || return 1
  121.  
  122. #this is another hack to fix an issue with gcc44-- once again I'm using sed because the Makefile is generated in this package
  123. if [ $(uname -m) = "x86_64" ]; then
  124. sed -r 's/\(MAKE\)\ -C\ xbmc\/screensavers$/\(MAKE\)\ CFLAGS=\"-march=k8\ -02\ -pipe\"\ -C\ xbmc\/screensavers/g' Makefile > Makefile.sed || return 1
  125. else
  126. sed -r 's/\(MAKE\)\ -C\ xbmc\/screensavers$/\(MAKE\)\ CFLAGS=\"-march=i486\ -02\ -pipe\"\ -C\ xbmc\/screensavers/g' Makefile > Makefile.sed || return 1
  127. fi
  128. cat Makefile.sed > Makefile || return 1
  129.  
  130. make || return 1
  131. popd || return 1
  132. }
  133.  
  134. package() {
  135.  
  136. #language
  137. install -d ${pkgdir}/opt/boxee/language || return 1
  138. pushd ${_src}/language/ || return 1
  139. find . | sed -e 's/\.\///g' | while read file; do
  140. if [ -d "$file" ]; then
  141. install -d ${pkgdir}/opt/boxee/language/"$file" || return 1
  142. else
  143. install -D "$file" ${pkgdir}/opt/boxee/language/"$file" || return 1
  144. fi || return 1
  145. done || return 1
  146. popd || return 1
  147.  
  148. #media
  149. install -d ${pkgdir}/opt/boxee/media || return 1
  150. pushd ${_src}/media/ || return 1
  151. find . | sed -e 's/\.\///g' | while read file; do
  152. if [ $(echo "$file" | grep "icon.png" -i -c) = 0 -a $(echo "$file" | grep "icon32x32.png" -i -c) = 0 -a $(echo "$file" | grep "xbmc.icns" -i -c) = 0 -a $(echo "$file" | grep "Boxee.ico" -i -c) = 0 -a $(echo "$file" | grep "Splash.png" -i -c) = 0 -a $(echo "$file" | grep "Splash_old.png" -i -c) = 0 -a $(echo "$file" | grep "Fonts/arial.ttf" -i -c) = 0 ]; then
  153. if [ -d "$file" ]; then
  154. install -d ${pkgdir}/opt/boxee/media/"$file" || return 1
  155. else
  156. install -D "$file" ${pkgdir}/opt/boxee/media/"$file" || return 1
  157. fi || return 1
  158. fi || return 1
  159. done || return 1
  160. popd || return 1
  161.  
  162. #scripts
  163. install -d ${pkgdir}/opt/boxee/scripts || return 1
  164. pushd ${_src}/scripts || return 1
  165. find . | sed -e 's/\.\///g' | while read file; do
  166. if [ $(echo "$file" | grep "scripts.zip" -i -c) = 0 -a $(echo "$file" | grep "user_submitted.zip" -i -c) = 0 -a $(echo "$file" | grep "autoexec.py" -i -c) = 0 ]; then
  167. if [ -d "$file" ]; then
  168. install -d ${pkgdir}/opt/boxee/scripts/"$file" || return 1
  169. else
  170. install -D "$file" ${pkgdir}/opt/boxee/scripts/"$file" || return 1
  171. fi || return 1
  172. fi || return 1
  173. done || return 1
  174. popd || return 1
  175.  
  176. #skin
  177. install -d ${pkgdir}/opt/boxee/skin/boxee || return 1
  178. pushd ${_src}/skin/boxee || return 1
  179. find . | sed -e 's/\.\///g' | while read file; do
  180. # if [ $(echo "$file" | grep -e "^media" -i -c) = 0 ]; then
  181. if [ -d "$file" ]; then
  182. install -d ${pkgdir}/opt/boxee/skin/boxee/"$file" || return 1
  183. else
  184. install -D "$file" ${pkgdir}/opt/boxee/skin/boxee/"$file" || return 1
  185. fi || return 1
  186. # fi || return 1
  187. done || return 1
  188. install -d ${pkgdir}/opt/boxee/skin/boxee/media || return 1
  189. popd || return 1
  190.  
  191. #system
  192. pushd ${_src}/system/python/local || return 1
  193. #This isn't indented because whitespace is significant to python
  194. python2.4 -O >/dev/null << EOF
  195. import py_compile
  196. py_compile.compile('mc.py')
  197. EOF
  198. popd || return 1
  199.  
  200. install -d ${pkgdir}/opt/boxee/system || return 1
  201. pushd ${_src}/system/ || return 1
  202. find . -path "./python/Lib" -prune -o -print | sed -e 's/\.\///g' | while read file; do
  203. if [ $(echo "$file" | grep "win32" -i -c) = 0 -a $(echo "$file" | grep "spyce" -i -c) = 0 -a $(echo "$file" | grep "DLLs" -i -c) = 0 -a $(echo "$file" | grep "osx" -i -c) = 0 -a $(echo "$file" | grep -e "\.dll$" -i -c) = 0 -a $(echo "$file" | grep -e "\.pyc$" -i -c) = 0 -a $(echo "$file" | grep "xulrunner" -i -c) = 0 -a $(echo "$file" | grep "etc" -i -c) = 0 -a $(echo "$file" | grep "python24.zlib" -i -c) = 0 -a $(echo "$file" | grep "upnpserver.xml" -i -c) = 0 -a $(echo "$file" | grep "IRSSmap.xml" -i -c) = 0 -a $(echo "$file" | grep "X10-Lola-IRSSmap.xml" -i -c) = 0 -a $(echo "$file" | grep "fontconfig_readme" -i -c) = 0 -a $(echo "$file" | grep "libmpeg2-i486-linux.so" -i -c) = 0 -a $(echo "$file" | grep "bxoverride.so" -i -c) = 0 -a $(echo "$file" | grep "readme.txt" -i -c) = 0 -a $(echo "$file" | grep "simplejson/_speedups.so" -i -c) = 0 ]; then
  204. if [ -d "$file" ]; then
  205. install -d ${pkgdir}/opt/boxee/system/"$file" || return 1
  206. else
  207. install -D "$file" ${pkgdir}/opt/boxee/system/"$file" || return 1
  208. fi || return 1
  209. fi || return 1
  210. done || return 1
  211. popd || return 1
  212.  
  213. install -d ${pkgdir}/opt/boxee/system/players/flashplayer/${_xulrunner} || return 1
  214. pushd ${_src}/system/players/flashplayer/${_xulrunner} || return 1
  215. find . | sed -e 's/\.\///g' | while read file; do
  216. if [ -d "$file" ]; then
  217. install -d ${pkgdir}/opt/boxee/system/players/flashplayer/${_xulrunner}/"$file" || return 1
  218. else
  219. install -D "$file" ${pkgdir}/opt/boxee/system/players/flashplayer/${_xulrunner}/"$file" || return 1
  220. fi || return 1
  221. done || return 1
  222. popd || return 1
  223.  
  224. install -d ${pkgdir}/opt/boxee/system/python/lib || return 1
  225. pushd ${_src}/system/python/Lib || return 1
  226. #This isn't indented because whitespace is significant to python
  227. python2.4 -O >/dev/null << EOF
  228. import compileall
  229. compileall.compile_dir(".", force=1)
  230. EOF
  231. find . | sed -e 's/\.\///g' | while read file; do
  232. if [ $(echo "$file" | grep -e "darwin$" -e "mac$" -i -c) = 0 ]; then
  233. if [ -d "$file" ]; then
  234. install -d ${pkgdir}/opt/boxee/system/python/lib/"$file" || return 1
  235. elif [ ! $(echo "$file" | grep -e "\.pyo$" -i -c) = 0 ]; then
  236. install -D "$file" ${pkgdir}/opt/boxee/system/python/lib/"$file" || return 1
  237. elif [ ! $(echo "$file" | grep -e "\.so$" -i -c) = 0 ]; then
  238. install -D "$file" ${pkgdir}/opt/boxee/system/python/lib/"$file" || return 1
  239. fi || return 1
  240. fi || return 1
  241. done || return 1
  242. popd || return 1
  243.  
  244. rm -rf ${pkgdir}/opt/boxee/system/python/lib/plat-darwin || return 1
  245. rm -rf ${pkgdir}/opt/boxee/system/python/lib/plat-mac || return 1
  246. rmdir ${pkgdir}/opt/boxee/system/python/lib/idlelib/Icons || return 1
  247. rmdir ${pkgdir}/opt/boxee/system/python/lib/site-packages || return 1
  248.  
  249. #userdata
  250. install -d ${pkgdir}/opt/boxee/UserData || return 1
  251. install -D ${_src}/UserData/*linux* ${pkgdir}/opt/boxee/UserData/ || return 1
  252. ln -s UserData ${pkgdir}/opt/boxee/userdata || return 1
  253.  
  254. #plugins
  255. install -d ${pkgdir}/opt/boxee/plugins/music || return 1
  256. install -d ${pkgdir}/opt/boxee/plugins/pictures || return 1
  257. install -d ${pkgdir}/opt/boxee/plugins/video || return 1
  258.  
  259. #visualisations
  260. install -d ${pkgdir}/opt/boxee/visualisations/
  261. pushd ${_src}/visualisations/ || return 1
  262. for i in *; do
  263. if [ -d "$i" ]; then
  264. install -d ${pkgdir}/opt/boxee/visualisations/"$i" || return 1
  265. if [ $(ls "$i" | wc -l) != "0" ]; then
  266. install -D "$i"/* ${pkgdir}/opt/boxee/visualisations/"$i"/ || return 1
  267. fi || return 1
  268. else
  269. if [ $(echo "$i" | grep "osx" -c) = "0" -a $(echo "$i" | grep "win32" -c) = "0" -a $(echo "$i" | grep "Goom.vis" -c) = "0" -a $(echo "$i" | grep "xbmc_vis.h" -c) = "0" ]; then
  270. install -D "$i" ${pkgdir}/opt/boxee/visualisations/ || return 1
  271. fi || return 1
  272. fi || return 1
  273. done || return 1
  274. popd || return 1
  275.  
  276. #remove unnecessary libs
  277. if [ $(uname -m) = "x86_64" ]; then
  278. rm -rf ${pkgdir}/opt/boxee/system/players/flashplayer/*486*
  279. else
  280. rm -rf ${pkgdir}/opt/boxee/system/players/flashplayer/*x86_64*
  281. fi
  282.  
  283. #screensavers
  284. install -d ${pkgdir}/opt/boxee/screensavers || return 1
  285. install -D ${_src}/screensavers/*.xbs ${pkgdir}/opt/boxee/screensavers/ || return 1
  286.  
  287. #rtorrent
  288. install -d ${pkgdir}/opt/boxee/bin || return 1
  289. install -D ${_src}/bin-linux/boxee-rtorrent ${pkgdir}/opt/boxee/bin/ || return 1
  290.  
  291. #boxee binary
  292. install -D ${_src}/Boxee ${pkgdir}/opt/boxee/ || return 1
  293. strip ${pkgdir}/opt/boxee/Boxee || return 1
  294. install -D ${_src}/run-boxee-desktop.in ${pkgdir}/opt/boxee/run-boxee-desktop || return 1
  295.  
  296. #give_me_my_mouse_back
  297. gcc ${_src}/give_me_my_mouse_back.c -o ${_src}/give_me_my_mouse_back -lSDL || return 1
  298. install -D ${_src}/give_me_my_mouse_back ${pkgdir}/opt/boxee/ || return 1
  299. strip ${pkgdir}/opt/boxee/give_me_my_mouse_back || return 1
  300.  
  301. #xbmc-xrandr
  302. install -D ${_src}/xbmc-xrandr ${pkgdir}/opt/boxee/ || return 1
  303. strip ${pkgdir}/opt/boxee/xbmc-xrandr || return 1
  304.  
  305. #freedesktop
  306. install -d ${pkgdir}/usr/share/applications || return 1
  307. install -D -m644 ${srcdir}/boxee.desktop ${pkgdir}/usr/share/applications/ || return 1
  308. install -d ${pkgdir}/usr/share/pixmaps || return 1
  309. install -D ${_src}/media/icon.png ${pkgdir}/usr/share/pixmaps/boxee.png || return 1
  310.  
  311. }
  312.  
  313.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement