]> git.sesse.net Git - vlc/commitdiff
UNPACK_DIR should only strip .tar as 2nd suffix
authorUwe L. Korn <uwelk@xhochy.com>
Mon, 28 Apr 2014 11:22:08 +0000 (11:22 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 3 May 2014 16:49:44 +0000 (18:49 +0200)
Fixes the problem where UNPACK_DIR returned rtmpdump-2 instead
of rtmpdumo-2.3 for rtmpdump-2.3. Only .tar.* archives have two
filetype suffixes, tgz, zip,.. have only one and the second "."
in the filename belongs to the version number which should not be
stripped.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
contrib/src/main.mak

index 45ba470762e83e8f560d15b575e6e9568b342047..ae01fead1766acdd85f9728468346ae22414e3c4 100644 (file)
@@ -301,7 +301,7 @@ UNPACK = $(RM) -R $@ \
        $(foreach f,$(filter %.tar.bz2,$^), && tar xvjf $(f)) \
        $(foreach f,$(filter %.tar.xz,$^), && tar xvJf $(f)) \
        $(foreach f,$(filter %.zip,$^), && unzip $(f))
-UNPACK_DIR = $(basename $(basename $(notdir $<)))
+UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<)))
 APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
 pkg_static = (cd $(UNPACK_DIR) && ../../../contrib/src/pkg-static.sh $(1))
 MOVE = mv $(UNPACK_DIR) $@ && touch $@