Public feed #377768

Anonymous

public text v1 · immutable
Raw Edit
·published 2007-03-02 00:29 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.
#
# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $

include $(TOPDIR)/rules.mk

PKG_NAME:=libapr1
PKG_VERSION:=1.2.8
PKG_RELEASE:=1

PKG_SOURCE:=apr-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=814f19528d9cfc79aef188dd752e04d8
PKG_SOURCE_URL:=http://apache.mirror.iphh.net/apr/
PKG_CAT:=zcat

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

include $(INCLUDE_DIR)/package.mk

define Package/libapr1
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=The Apache Portable Runtime Library
  DESCRIPTION:=\
	APR is Apache's Portable Runtime Library, designed to be a support library\\\
	that provides a predictable and consistent interface to underlying\\\
	platform-specific implementations.
  URL:=http://apr.apache.org/
endef

define Build/Configure
	$(call Build/Configure/Default, \
		ac_cv_func_setpgrp_void=yes \
		ac_cv_sizeof_size_t=4 \
		ac_cv_sizeof_ssize_t=4 \
		ac_cv_sizeof_off_t=4 \
		ac_cv_sizeof_pid_t=4 \
		apr_cv_process_shared_works=no \
		ac_cv_file__dev_zero=yes \
		apr_cv_tcp_nodelay_with_cork=no \
		--enable-shared \
		--enable-static \
	)
endef

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

define Build/InstallDev
	$(INSTALL_DIR) $(STAGING_DIR)/usr/bin/
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/apr-1-config $(STAGING_DIR)/usr/bin/
	$(INSTALL_DIR) $(STAGING_DIR)/usr/include/apr-1/
	$(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* $(STAGING_DIR)/usr/include/apr-1/
	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{a,so*} $(STAGING_DIR)/usr/lib/
	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/pkgconfig/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc $(STAGING_DIR)/usr/lib/pkgconfig/
	$(INSTALL_DIR $(STAGING_DIR)/usr/share/build-1/
	$(CP) $(PKG_INSTALL_DIR)/usr/share/build-1/ $(STAGING_DIR)/usr/share/
	$(SED) -ie 's,apr_builddir=/usr/share/build-1,apr_builddir=$(STAGING_DIR)/usr/share/build-1,g' \
		$(STAGING_DIR)/usr/share/build-1/apr_rules.mk
	$(SED) -ie 's,apr_builders=/usr/share/build-1,apr_builders=$(STAGING_DIR)/usr/share/build-1,g' \
		$(STAGING_DIR)/usr/share/build-1/apr_rules.mk
endef

define Build/UninstallDev
	rm -rf \
		$(STAGING_DIR)/usr/bin/apr-1-config \
		$(STAGING_DIR)/usr/include/apr-1/ \
		$(STAGING_DIR)/usr/lib/libapr-1.{a,so*} \
		$(STAGING_DIR)/usr/lib/pkgconfig/apr-1.pc \
		$(STAGING_DIR)/usr/share/build-1/
endef

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

$(eval $(call BuildPackage,libapr1))