1 # ***************************************************************************
2 # Makefile : Build vlc-contrib files
3 # ***************************************************************************
4 # Copyright (C) 2003-2010 the VideoLAN team
7 # Authors: Christophe Massiot <massiot@via.ecp.fr>
8 # Derk-Jan Hartman <hartman at videolan dot org>
9 # Christophe Mutricy <xtophe at videolan dot org>
10 # Felix Paul Kühne <fkuehne at videolan dot org>
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 # ***************************************************************************
29 BUILDDIRS
= hosts build
42 (cd
$(PREFIX
)/lib
&& sed
-e
's%/usr/lib/libiconv.la%$(PREFIX)/lib/libiconv.la%g' -i.orig
*.la
&& rm -f
*.la.orig
)
52 contrib-macosx-
$(ARCH
)-$(CONTRIBREV
).
tar.bz2
:
53 $(WGET
) http
://downloads.videolan.org
/pub
/videolan
/testing
/contrib
/$@
55 hosts
/$(HOST
)/.
$(CONTRIBREV
): contrib-macosx-
$(ARCH
)-$(CONTRIBREV
).
tar.bz2
56 @if
test -d tmp
; then \
57 echo
"Move away ./tmp, it's in the way" ; \
62 (cd tmp
&& tar jxvf ..
/$<)
63 .
/change_prefix.sh tmp @@CONTRIB_PREFIX@@
$(PREFIX
)
64 (cd tmp
&& find .
-type d
) | while read
dir; do mkdir
-p
-- "$(PREFIX)/$$dir"; done
65 (cd tmp
&& find .
-not
-type d
) | while read i
; do mv
-f
-- tmp
/"$$i" "$(PREFIX)/$$i"; done
67 # install the gecko-sdk, which isn't part of the package for size and speed reasons
68 (cd src
&& rm -rf
*gecko
* && $(MAKE
) .gecko
)
69 # libiconv.la is no longer present on Snow Leopard, so fix possible references to it, which would
70 # result in linking issues
72 (cd
$(PREFIX
)/lib
&& sed
-e
's%/usr/lib/libiconv.la%$(PREFIX)/lib/libiconv.la%g' -i.orig
*.la
&& rm -f
*.la.orig
)
73 (cd src
&& rm -f .iconv
&& $(MAKE
) .iconv
)
75 touch hosts
/$(HOST
)/.
$(CONTRIBREV
)
77 using-bin
: hosts
/$(HOST
)/.
$(CONTRIBREV
)
87 $(MAKE
) -C src clean-dots
91 $(MAKE
) -C src clean-src
92 rm -rf config.mak distro.mak
97 @if
test -d tmp
; then \
98 echo
"Move away ./tmp, it's in the way" ; \
102 (cd
$(PREFIX
); tar cf
- Sparkle bin sbin
include lib share
/aclocal
* share
/autoconf
* \
103 share
/automake
* share
/gettext
* share
/libtool
*) |
(cd tmp
; tar xf
-)
104 .
/change_prefix.sh tmp
$(PREFIX
) @@CONTRIB_PREFIX@@
105 (cd tmp
; tar cf
- .
) | bzip2
-c
> contrib-macosx.
tar.bz2
107 rm -f contrib-macosx-
$(ARCH
)-$(CONTRIBREV
).
tar.bz2
108 mv contrib-macosx.
tar.bz2 contrib-macosx-
$(ARCH
)-$(CONTRIBREV
).
tar.bz2
113 @if
test -d tmp
; then \
114 echo
"Move away ./tmp, it's in the way" ; \
117 mkdir
-p tmp
/$(DISTDIR
)
118 (cd
$(PREFIX
); tar cf
- --dereference bin sbin
include lib share
/aclocal
*\
119 share
/autoconf
* share
/qt4
* \
120 share
/automake
* share
/gettext
* gecko-sdk
)\
121 |
(cd tmp
/$(DISTDIR
); tar xpf
-)
123 mkdir
-p tmp
/$(DISTDIR
)/live.com
124 for i in groupsock liveMedia UsageEnvironment BasicUsageEnvironment
; do \
125 mkdir
-p tmp
/$(DISTDIR
)/live.com
/$$i/include; \
126 cp
-r src
/live
/$$i/include tmp
/$(DISTDIR
)/live.com
/$$i; \
127 cp src
/live
/$$i/lib
$${i}.a tmp
/$(DISTDIR
)/live.com
/$$i; \
130 .
/change_prefix.sh tmp
$(PREFIX
) $(DISTDIR
)
131 # Remove unused and potentially harmful files (but skip qt4 executables)
132 (cd tmp
/$(DISTDIR
)/bin
&& rm -fv
`find . -name 'uic.exe' -o -name 'rcc.exe' -o -name 'moc.exe' -o -name '*.exe' -printf '%p '` && chmod a
+x
* || true
)
134 (cd tmp
; tar cf
- $(DISTDIR
)) | bzip2
-c
> contrib-
`date +%Y%m%d`-win
$*-bin-gcc-
`$(CC) --version|head -n 1|cut -f 3 -d ' '`-runtime-
`/bin/echo -e "#include <_mingw.h>\n__MINGW32_VERSION"|$(CC) -E -|grep -v ^#|grep -v ' '`-only.
tar.bz2
137 .PHONY
: all clean-src clean-bin
clean package-macosx