1 include $(TOPDIR
)/rules.mk
7 PKG_SOURCE_SITE
:= http
://nbd.vd-s.ath.cx
/openwrt
8 PKG_SOURCE_FILE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
10 PKG_SOURCE_DIR
:= $(PKG_NAME
)
11 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_SOURCE_DIR
)
12 PKG_IPK
:= $(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
15 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
17 $(WGET
) -P
$(DL_DIR
) $(PKG_SOURCE_SITE
)/$(PKG_SOURCE_FILE
)
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
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"
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
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
)
45 source
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
46 prepare
: $(PKG_BUILD_DIR
)/.patched
47 compile
: $(STAGING_DIR
)/lib
/libmatrixssl.so
$(PKG_IPK
)
49 $(IPKG
) install $(PACKAGE_DIR
)/$(PKG_IPK
)
51 rm -rf
$(PKG_BUILD_DIR
)
52 rm -f
$(STAGING_DIR
)/lib
/libmatrixssl
* $(STAGING_DIR
)/include/matrixssl
*
53 rm -f
$(PACKAGE_DIR
)/matrixssl\
*.ipk