All pastes #337384 Raw Edit

Untitled

public text v1 · immutable
·published 2007-02-02 19:15 UTC
rendered paste body
# 
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=libvorbis
PKG_VERSION:=1.1.2
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.xiph.org/releases/vorbis/
PKG_MD5SUM:=37847626b8e1b53ae79a34714c7b3211
PKG_CAT:=zcat

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

include $(INCLUDE_DIR)/package.mk

define Package/libvorbis
  SECTION:=libs
  CATEGORY:=Libraries
  DEPENDS:=+libogg
  TITLE:=libvorbis
  DESCRIPTION:=\
  	the Ogg Vorbis sound file format library
  URL:=http://www.xiph.org/vorbis/
endef

define Build/Configure
	$(call Build/Configure/Default, \
		--enable-shared \
		--enable-static \
		--disable-oggtest \
		--disable-docs \
		--with-ogg-libraries="$(STAGING_DIR)/usr/lib/" \
		--with-ogg-includes="$(STAGING_DIR)/usr/include/ogg/" \
		LDFLAGS="-L$(STAGING_DIR)/usr/lib/ -logg" \
	)
endef

define Build/Compile
	$(MAKE) -C $(PKG_BUILD_DIR) \
		DESTDIR="$(PKG_INSTALL_DIR)" \
		all install
endef

define Build/InstallDev
	$(INSTALL_DIR) $(STAGING_DIR)/usr/include/vorbis/
	$(CP) $(PKG_INSTALL_DIR)/usr/include/vorbis/* $(STAGING_DIR)/usr/include/vorbis/
	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbis.so* $(STAGING_DIR)/usr/lib/
	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/pkgconfig/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/vorbis*.pc $(STAGING_DIR)/usr/lib/pkgconfig/
endef

define Build/UninstallDev
	rm -rf \
		$(STAGING_DIR)/usr/include/vorbis/ \
		$(STAGING_DIR)/usr/lib/libvorbis.{a,so*,la} \
		$(STAGING_DIR)/usr/lib/pkgconfig/vorbis*.pc
endef

define Package/libvorbis/install
	$(INSTALL_DIR) $(1)/usr/lib/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbis.so* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libvorbis))