Add kmod-nfs package
[openwrt.git] / openwrt / package / matrixssl / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME := matrixssl
4 PKG_VERSION := 1.2.4
5 PKG_RELEASE := 1
6
7 PKG_SOURCE_SITE := http://nbd.vd-s.ath.cx/openwrt
8 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
9 PKG_SOURCE_CAT := zcat
10 PKG_SOURCE_DIR := $(PKG_NAME)
11 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
12 PKG_IPK := $(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
13
14
15 $(DL_DIR)/$(PKG_SOURCE_FILE):
16 mkdir -p $(DL_DIR)
17 $(WGET) -P $(DL_DIR) $(PKG_SOURCE_SITE)/$(PKG_SOURCE_FILE)
18
19 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
20 mkdir -p $(TOOL_BUILD_DIR)
21 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
22 $(PATCH) $(PKG_BUILD_DIR) ./patches
23 touch $(PKG_BUILD_DIR)/.patched
24
25 $(PKG_BUILD_DIR)/src/libmatrixssl.so: $(PKG_BUILD_DIR)/.patched
26 $(MAKE) -C $(PKG_BUILD_DIR)/src \
27 $(TARGET_CONFIGURE_OPTS) \
28 DFLAGS="$(TARGET_CFLAGS) -Wall"
29
30 $(STAGING_DIR)/lib/libmatrixssl.so: $(PKG_BUILD_DIR)/src/libmatrixssl.so
31 cp -a $(PKG_BUILD_DIR)/src/libmatrixssl.so* $(STAGING_DIR)/lib
32 mkdir -p $(STAGING_DIR)/include/matrixSsl
33 cp $(PKG_BUILD_DIR)/matrixSsl.h $(STAGING_DIR)/include/matrixSsl
34 ln -sf matrixSsl/matrixSsl.h $(STAGING_DIR)/include/matrixSsl.h
35
36 $(PKG_IPK): $(STAGING_DIR)/lib/libmatrixssl.so
37 mkdir -p $(PACKAGE_DIR)
38 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/matrixssl matrixssl.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
39 mkdir -p $(PKG_BUILD_DIR)/ipkg/matrixssl/usr/lib
40 cp -a $(PKG_BUILD_DIR)/src/libmatrixssl.so* $(PKG_BUILD_DIR)/ipkg/matrixssl/usr/lib
41 $(STRIP) $(PKG_BUILD_DIR)/ipkg/matrixssl/usr/lib/*
42 $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/matrixssl $(PACKAGE_DIR)
43
44 $(IPKG_STATE_DIR)/info/libmatrixssl.list: $(PKG_IPK)
45 $(IPKG) install $(PKG_IPK)
46
47 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
48 prepare: $(PKG_BUILD_DIR)/.patched
49 compile: $(STAGING_DIR)/lib/libmatrixssl.so $(PKG_IPK)
50 install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/libmatrixssl.list
51
52 clean:
53 rm -rf $(PKG_BUILD_DIR)
54 rm -f $(STAGING_DIR)/lib/libmatrixssl* $(STAGING_DIR)/include/matrixssl*
55 rm -f $(PKG_IPK)
56
This page took 0.059507 seconds and 5 git commands to generate.