| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= libmad
|
|---|
| 10 | PKG_VERSION:= 0.15.1b
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= 1be543bc30c56fb6bea1d7bf6a64e66c
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= @SF/mad \
|
|---|
| 15 | ftp://ftp.mars.org/pub/mpeg/
|
|---|
| 16 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 17 |
|
|---|
| 18 | include $(TOPDIR)/mk/package.mk
|
|---|
| 19 |
|
|---|
| 20 | $(eval $(call PKG_template,LIBMAD,libmad,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 21 |
|
|---|
| 22 | FPM:=default
|
|---|
| 23 | ifeq ($(ARCH),i386)
|
|---|
| 24 | FPM:=intel
|
|---|
| 25 | endif
|
|---|
| 26 | ifeq ($(ARCH),mipsel)
|
|---|
| 27 | FPM:=mips
|
|---|
| 28 | endif
|
|---|
| 29 |
|
|---|
| 30 | $(WRKBUILD)/.configured:
|
|---|
| 31 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 32 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 33 | CFLAGS="$(strip $(TARGET_CFLAGS))" \
|
|---|
| 34 | CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|---|
| 35 | LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
|---|
| 36 | PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
|
|---|
| 37 | ./configure \
|
|---|
| 38 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 39 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 40 | --build=$(GNU_HOST_NAME) \
|
|---|
| 41 | --program-prefix="" \
|
|---|
| 42 | --program-suffix="" \
|
|---|
| 43 | --prefix=/usr \
|
|---|
| 44 | --exec-prefix=/usr \
|
|---|
| 45 | --bindir=/usr/bin \
|
|---|
| 46 | --datadir=/usr/share \
|
|---|
| 47 | --includedir=/usr/include \
|
|---|
| 48 | --infodir=/usr/share/info \
|
|---|
| 49 | --libdir=/usr/lib \
|
|---|
| 50 | --libexecdir=/usr/lib \
|
|---|
| 51 | --localstatedir=/var \
|
|---|
| 52 | --mandir=/usr/share/man \
|
|---|
| 53 | --sbindir=/usr/sbin \
|
|---|
| 54 | --sysconfdir=/etc \
|
|---|
| 55 | --enable-largefile \
|
|---|
| 56 | --disable-nls \
|
|---|
| 57 | --enable-shared \
|
|---|
| 58 | --enable-static \
|
|---|
| 59 | --disable-rpath \
|
|---|
| 60 | --with-gnu-ld \
|
|---|
| 61 | --enable-fpm=$(FPM) \
|
|---|
| 62 | --disable-debugging \
|
|---|
| 63 | --enable-speed \
|
|---|
| 64 | );
|
|---|
| 65 | touch $@
|
|---|
| 66 |
|
|---|
| 67 | $(WRKBUILD)/.built:
|
|---|
| 68 | rm -rf $(WRKINST)
|
|---|
| 69 | mkdir -p $(WRKINST)
|
|---|
| 70 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 71 | DESTDIR="$(WRKINST)" \
|
|---|
| 72 | all install
|
|---|
| 73 | touch $@
|
|---|
| 74 |
|
|---|
| 75 | $(IPKG_LIBMAD):
|
|---|
| 76 | install -m0755 -d $(IDIR_LIBMAD)/usr/lib
|
|---|
| 77 | $(CP) $(WRKINST)/usr/lib/libmad.so.* $(IDIR_LIBMAD)/usr/lib/
|
|---|
| 78 | $(RSTRIP) $(IDIR_LIBMAD)
|
|---|
| 79 | $(IPKG_BUILD) $(IDIR_LIBMAD) $(PACKAGE_DIR)
|
|---|
| 80 |
|
|---|
| 81 | $(STAGING_DIR)/usr/lib/libmad.so: $(WRKBUILD)/.built
|
|---|
| 82 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 83 | $(CP) $(WRKINST)/usr/include/mad.h $(STAGING_DIR)/usr/include/
|
|---|
| 84 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 85 | $(CP) $(WRKINST)/usr/lib/libmad.a $(STAGING_DIR)/usr/lib/
|
|---|
| 86 | $(CP) $(WRKINST)/usr/lib/libmad.so* $(STAGING_DIR)/usr/lib/
|
|---|
| 87 | touch $@
|
|---|
| 88 |
|
|---|
| 89 | install-dev: $(STAGING_DIR)/usr/lib/libmad.so
|
|---|
| 90 |
|
|---|
| 91 | uninstall-dev:
|
|---|
| 92 | rm -rf \
|
|---|
| 93 | $(STAGING_DIR)/usr/include/mad.h \
|
|---|
| 94 | $(STAGING_DIR)/usr/lib/libmad.a \
|
|---|
| 95 | $(STAGING_DIR)/usr/lib/libmad.so* \
|
|---|
| 96 |
|
|---|
| 97 | compile-targets: install-dev
|
|---|
| 98 | clean-targets: uninstall-dev
|
|---|