This repository has been archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
libtiff.mk
78 lines (60 loc) · 2.02 KB
/
libtiff.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#########################################################
# libtiff for uClinux and Asterisk,
# Jeff Knighton Feb 2008
#
# usage: make -f libtiff.mk libtiff-package
#
# Run after building uClinux-dist, copies shared libs to
# uClinux-dist/staging, ready for use in Asterisk if
# required.
#########################################################
include rules.mk
LIBTIFF_SITE=http://dl.maptools.org/dl/libtiff
LIBTIFF_VERSION=3.8.2
LIBTIFF_SOURCE=tiff-3.8.2.tar.gz
LIBTIFF_DIR=$(BUILD_DIR)/tiff-$(LIBTIFF_VERSION)
LIBTIFF_CONFIGURE_OPTS=--host=bfin-linux-uclibc
TARGET_DIR=$(BUILD_DIR)/tmp/libtiff/ipkg/libtiff
PKG_NAME:=libtiff
PKG_VERSION:=$(LIBTIFF_VERSION)
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/tmp/libtiff
$(DL_DIR)/$(LIBTIFF_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBTIFF_SITE)/$(LIBTIFF_SOURCE)
libtiff-source: $(DL_DIR)/$(LIBTIFF_SOURCE)
$(LIBTIFF_DIR)/.unpacked: $(DL_DIR)/$(LIBTIFF_SOURCE)
tar -xzvf $(DL_DIR)/$(LIBTIFF_SOURCE)
touch $(LIBTIFF_DIR)/.unpacked
$(LIBTIFF_DIR)/.configured: $(LIBTIFF_DIR)/.unpacked
cd $(LIBTIFF_DIR); ./configure $(LIBTIFF_CONFIGURE_OPTS)
#setup directories for package
touch $(LIBTIFF_DIR)/.configured
libtiff: $(LIBTIFF_DIR)/.configured
make -C $(LIBTIFF_DIR)/ STAGEDIR=$(STAGING_DIR)
cp -f $(LIBTIFF_DIR)/libtiff/.libs/libtiff* $(STAGING_DIR)/usr/lib/
#copy to package location
rm -Rf $(TARGET_DIR)
mkdir -p $(TARGET_DIR)/lib
cp -f $(LIBTIFF_DIR)/libtiff/.libs/libtiff.so.3 $(TARGET_DIR)/lib
$(TARGET_STRIP) $(TARGET_DIR)/lib/libtiff.so.3
cd $(TARGET_DIR)/lib/; ln -sf libtiff.so.3 libtiff.so
touch $(PKG_BUILD_DIR)/.built
all: libtiff
libtiff-dirclean:
rm -rf $(LIBTIFF_DIR)
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
TITLE:=Libtiff
DESCRIPTION:=\
Tiff image file format library.
URL:=http://www.libtiff.org
endef
#post installation - do nothing
define Package/$(PKG_NAME)/postinst
endef
#pre-remove
define Package/$(PKG_NAME)/prerm
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
libtiff-package: libtiff $(PACKAGE_DIR)/$(PKG_NAME)_$(VERSION)_$(PKGARCH).ipk