###############################################################################
-# #
-# IPFire.org - A linux based firewall #
-# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
-# #
-# This program is free software: you can redistribute it and/or modify #
-# it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation, either version 3 of the License, or #
-# (at your option) any later version. #
-# #
-# This program is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with this program. If not, see <http://www.gnu.org/licenses/>. #
-# #
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) - IPFire Development Team <info@ipfire.org> #
###############################################################################
-###############################################################################
-# Definitions
-###############################################################################
-
-include $(PKGROOT)/Include
-
-PKG_NAME = nspr
-PKG_VER = 4.8.6
-PKG_REL = 1
-
-PKG_MAINTAINER =
-PKG_GROUP = System/Libraries
-PKG_URL = http://www.mozilla.org/projects/nspr/
-PKG_LICENSE = MPLv1.1 or GPLv2+ or LGPLv2+
-PKG_SUMMARY = Netscape Portable Runtime.
+name = nspr
+version = 4.8.6
+release = 1
-PKG_BUILD_DEPS+= pkg-config
+groups = System/Libraries
+url = http://www.mozilla.org/projects/nspr/
+license = MPLv1.1 or GPLv2+ or LGPLv2+
+summary = Netscape Portable Runtime.
-define PKG_DESCRIPTION
- NSPR provides platform independence for non-GUI operating system \
- facilities. These facilities include threads, thread synchronization, \
- normal file and network I/O, interval timing and calendar time, basic \
+description
+ NSPR provides platform independence for non-GUI operating system
+ facilities. These facilities include threads, thread synchronization,
+ normal file and network I/O, interval timing and calendar time, basic
memory management (malloc and free) and shared library linking.
-endef
-
-PKG_TARBALL = $(THISAPP).tar.gz
-
-PKG_PACKAGES += $(PKG_NAME_REAL)-devel
-
-# Original nspr-config is not suitable for our distribution,
-# because on different platforms it contains different dynamic content.
-# Therefore we produce an adjusted copy of nspr-config that will be
-# identical on all platforms.
-# However, we need to use original nspr-config to produce some variables
-# that go into nspr.pc for pkg-config.
-
-define STAGE_PREPARE
- cd $(DIR_SRC) && $(DO_EXTRACT) $(DIR_DL)/$(PKG_TARBALL)
-
- cp -vf $(DIR_APP)/mozilla/nsprpub/config/nspr-config.in \
- $(DIR_APP)/mozilla/nsprpub/config/nspr-config-pc.in
- cp -vf $(DIR_SOURCE)/nspr-config-vars.in \
- $(DIR_APP)/mozilla/nsprpub/config/
-
- $(DO_PATCHES)
-endef
-
-define STAGE_BUILD
- cd $(DIR_APP) && $(DIR_APP)/mozilla/nsprpub/configure \
- $(CONFIGURE_OPTIONS) \
- --libdir=/lib \
- --includedir=/usr/include/nspr4 \
- --enable-optimize="$(CFLAGS)" \
- --disable-debug
-
- cd $(DIR_APP) && make
-endef
-
-define STAGE_INSTALL_CMDS
- -mkdir -pv $(BUILDROOT)/usr/{bin,lib}
- -mkdir -pv $(BUILDROOT)/lib
- -mkdir -pv $(BUILDROOT)/usr/lib/pkgconfig
-
- cp -vf $(DIR_APP)/config/nspr-config-pc \
- $(BUILDROOT)/usr/bin/nspr-config
-
- sed \
- -e "s,%libdir%,/usr/lib,g" \
- -e "s,%prefix%,/usr,g" \
- -e "s,%exec_prefix%,/usr,g" \
- -e "s,%includedir%,/usr/include/nspr4,g" \
- -e "s,%NSPR_VERSION%,$(PKG_VER),g" \
- -e "s,%FULL_NSPR_LIBS%,-L/usr/lib -lnspr4 -lplc4 -lplds4 -ldl -lpthread,g" \
- -e "s,%FULL_NSPR_CFLAGS%,-I/usr/include/nspr4,g" \
- < $(DIR_SOURCE)/nspr.pc.in \
- > $(BUILDROOT)/usr/lib/pkgconfig/nspr.pc
-
- #mv -v $(BUILDROOT)/usr/lib/lib{nspr,plc.plds}4.so $(BUILDROOT)/lib/
- ln -svf ../../lib/libnspr4.so $(BUILDROOT)/usr/lib/libnspr4.so
- ln -svf ../../lib/libplc4.so $(BUILDROOT)/usr/lib/libplc4.so
- ln -svf ../../lib/libplds4.so $(BUILDROOT)/usr/lib/libplds4.so
-
- # Remove unneeded stuff
- rm -rfv \
- $(BUILDROOT)/usr/bin/compile-et.pl \
- $(BUILDROOT)/usr/bin/prerr.properties \
- $(BUILDROOT)/usr/share/aclocal/nspr.m4 \
- $(BUILDROOT)/usr/include/nspr4/md
-endef
+end
+
+source_dl =
+
+build
+ requires
+ pkg-config
+ end
+
+ # Original nspr-config is not suitable for our distribution,
+ # because on different platforms it contains different dynamic content.
+ # Therefore we produce an adjusted copy of nspr-config that will be
+ # identical on all platforms.
+ # However, we need to use original nspr-config to produce some variables
+ # that go into nspr.pc for pkg-config.
+
+ prepare
+ cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{sources}
+
+ cp -vf %{DIR_APP}/mozilla/nsprpub/config/nspr-config.in \
+ %{DIR_APP}/mozilla/nsprpub/config/nspr-config-pc.in
+ cp -vf %{DIR_SOURCE}/nspr-config-vars.in \
+ %{DIR_APP}/mozilla/nsprpub/config/
+ cd %{DIR_APP}
+
+ %{MACRO_PATCHES}
+ end
+
+ build
+ %{DIR_APP}/mozilla/nsprpub/configure \
+ %{configure_options} \
+ --libdir=/lib \
+ --includedir=/usr/include/nspr4 \
+ --enable-optimize="%{CFLAGS}" \
+ --disable-debug
+
+ make
+ end
+
+ install_cmds
+ mkdir -pv %{BUILDROOT}/usr/{bin,lib}
+ mkdir -pv %{BUILDROOT}/lib
+ mkdir -pv %{BUILDROOT}/usr/lib/pkgconfig
+
+ cp -vf %{DIR_APP}/config/nspr-config-pc \
+ %{BUILDROOT}/usr/bin/nspr-config
+
+ sed \
+ -e "s,%libdir%,/usr/lib,g" \
+ -e "s,%prefix%,/usr,g" \
+ -e "s,%exec_prefix%,/usr,g" \
+ -e "s,%includedir%,/usr/include/nspr4,g" \
+ -e "s,%NSPR_VERSION%,%{version},g" \
+ -e "s,%FULL_NSPR_LIBS%,-L/usr/lib -lnspr4 -lplc4 -lplds4 -ldl -lpthread,g" \
+ -e "s,%FULL_NSPR_CFLAGS%,-I/usr/include/nspr4,g" \
+ < %{DIR_SOURCE}/nspr.pc.in \
+ > %{BUILDROOT}/usr/lib/pkgconfig/nspr.pc
+
+ #mv -v %{BUILDROOT}/usr/lib/lib{nspr,plc.plds}4.so %{BUILDROOT}/lib/
+ ln -svf ../../lib/libnspr4.so %{BUILDROOT}/usr/lib/libnspr4.so
+ ln -svf ../../lib/libplc4.so %{BUILDROOT}/usr/lib/libplc4.so
+ ln -svf ../../lib/libplds4.so %{BUILDROOT}/usr/lib/libplds4.so
+
+ # Remove unneeded stuff
+ rm -rfv \
+ %{BUILDROOT}/usr/bin/compile-et.pl \
+ %{BUILDROOT}/usr/bin/prerr.properties \
+ %{BUILDROOT}/usr/share/aclocal/nspr.m4 \
+ %{BUILDROOT}/usr/include/nspr4/md
+ end
+end
+
+packages
+ package %{name}
+
+ package %{name}-devel
+ template DEVEL
+ end
+end