| 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:= speex
|
|---|
| 10 | PKG_VERSION:= 1.2beta1
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= aac2e4ba42122b885c787ea280acb3d9
|
|---|
| 13 | PKG_SOURCE_URL:= http://downloads.us.xiph.org/releases/speex
|
|---|
| 14 |
|
|---|
| 15 | include $(TOPDIR)/mk/package.mk
|
|---|
| 16 |
|
|---|
| 17 | $(eval $(call PKG_template,LIBSPEEX,libspeex,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 18 |
|
|---|
| 19 | $(WRKBUILD)/.configured:
|
|---|
| 20 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 21 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 22 | CFLAGS="$(strip $(TARGET_CFLAGS))" \
|
|---|
| 23 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 24 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 25 | LIBS="-lnotimpl" \
|
|---|
| 26 | ./configure \
|
|---|
| 27 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 28 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 29 | --build=$(GNU_HOST_NAME) \
|
|---|
| 30 | --program-prefix="" \
|
|---|
| 31 | --program-suffix="" \
|
|---|
| 32 | --prefix=/usr \
|
|---|
| 33 | --exec-prefix=/usr \
|
|---|
| 34 | --bindir=/usr/bin \
|
|---|
| 35 | --datadir=/usr/share \
|
|---|
| 36 | --includedir=/usr/include \
|
|---|
| 37 | --infodir=/usr/share/info \
|
|---|
| 38 | --libdir=/usr/lib \
|
|---|
| 39 | --libexecdir=/usr/lib \
|
|---|
| 40 | --localstatedir=/var \
|
|---|
| 41 | --mandir=/usr/share/man \
|
|---|
| 42 | --sbindir=/usr/sbin \
|
|---|
| 43 | --sysconfdir=/etc \
|
|---|
| 44 | --disable-nls \
|
|---|
| 45 | --enable-shared \
|
|---|
| 46 | --enable-static \
|
|---|
| 47 | --disable-oggtest \
|
|---|
| 48 | --enable-fixed-point \
|
|---|
| 49 | );
|
|---|
| 50 | touch $@
|
|---|
| 51 |
|
|---|
| 52 | $(WRKBUILD)/.built:
|
|---|
| 53 | rm -rf $(WRKINST)
|
|---|
| 54 | mkdir -p $(WRKINST)
|
|---|
| 55 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 56 | DESTDIR="$(WRKINST)" \
|
|---|
| 57 | bin_PROGRAMS="" \
|
|---|
| 58 | all install
|
|---|
| 59 | touch $@
|
|---|
| 60 |
|
|---|
| 61 | $(IPKG_LIBSPEEX):
|
|---|
| 62 | install -d -m0755 $(IDIR_LIBSPEEX)/usr/lib
|
|---|
| 63 | $(CP) $(WRKINST)/usr/lib/libspeex.so.* $(IDIR_LIBSPEEX)/usr/lib/
|
|---|
| 64 | $(RSTRIP) $(IDIR_LIBSPEEX)
|
|---|
| 65 | $(IPKG_BUILD) $(IDIR_LIBSPEEX) $(PACKAGE_DIR)
|
|---|
| 66 |
|
|---|
| 67 | $(STAGING_DIR)/usr/lib/libspeex.so: $(WRKBUILD)/.built
|
|---|
| 68 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 69 | $(CP) $(WRKINST)/usr/include/speex $(STAGING_DIR)/usr/include/
|
|---|
| 70 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 71 | $(CP) $(WRKINST)/usr/lib/libspeex.{a,so*} $(STAGING_DIR)/usr/lib/
|
|---|
| 72 | mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
|
|---|
| 73 | $(CP) $(WRKINST)/usr/lib/pkgconfig/speex.pc $(STAGING_DIR)/usr/lib/pkgconfig/
|
|---|
| 74 | touch $@
|
|---|
| 75 |
|
|---|
| 76 | install-dev: $(STAGING_DIR)/usr/lib/libspeex.so
|
|---|
| 77 |
|
|---|
| 78 | uninstall-dev:
|
|---|
| 79 | rm -rf \
|
|---|
| 80 | $(STAGING_DIR)/usr/include/speex \
|
|---|
| 81 | $(STAGING_DIR)/usr/lib/libspeex.{a,so*} \
|
|---|
| 82 | $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc \
|
|---|
| 83 |
|
|---|
| 84 | compile-targets: install-dev
|
|---|
| 85 | clean-targets: uninstall-dev
|
|---|