summaryrefslogtreecommitdiffstats
path: root/rules/liblzo.make
blob: 2d67b723f93f3b73807afd7aaf56b279322fbae5 (plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# -*-makefile-*-
# $Id: template 6655 2007-01-02 12:55:21Z rsc $
#
# Copyright (C) 2007 by Carsten Schlote <c.schlote@konzeptpark.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_LIBLZO) += liblzo

#
# Paths and names
#
LIBLZO_VERSION	:= 2.02
LIBLZO		:= lzo-$(LIBLZO_VERSION)
LIBLZO_SUFFIX	:= tar.gz
LIBLZO_URL	:= http://www.oberhumer.com/opensource/lzo/download/$(LIBLZO).$(LIBLZO_SUFFIX)
LIBLZO_SOURCE	:= $(SRCDIR)/$(LIBLZO).$(LIBLZO_SUFFIX)
LIBLZO_DIR	:= $(BUILDDIR)/$(LIBLZO)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(LIBLZO_SOURCE):
	@$(call targetinfo)
	@$(call get, LIBLZO)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

$(STATEDIR)/liblzo.extract: $(liblzo_extract_deps_default)
	@$(call targetinfo)
	@$(call clean, $(LIBLZO_DIR))
	@$(call extract, LIBLZO)
	@$(call patchin, LIBLZO)
	@$(call touch)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

LIBLZO_PATH	:= PATH=$(CROSS_PATH)
LIBLZO_ENV 	:= $(CROSS_ENV)

#
# autoconf
#
LIBLZO_AUTOCONF := $(CROSS_AUTOCONF_USR)

ifdef PTXCONF_LIBLZO_SHARED
LIBLZO_AUTOCONF += --enable-shared
else
LIBLZO_AUTOCONF += --disable-shared
endif

ifdef PTXCONF_LIBLZO_STATIC
LIBLZO_AUTOCONF += --enable-static
else
LIBLZO_AUTOCONF += --disable-static
endif

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/liblzo.targetinstall:
	@$(call targetinfo)

	@$(call install_init, liblzo)
	@$(call install_fixup, liblzo,PACKAGE,liblzo)
	@$(call install_fixup, liblzo,PRIORITY,optional)
	@$(call install_fixup, liblzo,VERSION,$(LIBLZO_VERSION))
	@$(call install_fixup, liblzo,SECTION,base)
	@$(call install_fixup, liblzo,AUTHOR,"Carsten Schlote <c.schlote@konzeptpark.de>")
	@$(call install_fixup, liblzo,DEPENDS,)
	@$(call install_fixup, liblzo,DESCRIPTION,missing)

  ifdef PTXCONF_LIBLZO_SHARED
	@$(call install_copy, liblzo, 0, 0, 0644, $(LIBLZO_DIR)/src/.libs/liblzo2.so.2.0.0, /usr/lib/liblzo2.so.2.0.0)

	@$(call install_link, liblzo, liblzo2.so.2.0.0, /usr/lib/liblzo2.so.2)
	@$(call install_link, liblzo, liblzo2.so.2.0.0, /usr/lib/liblzo2.so)
  endif

  ifdef PTXCONF_LIBLZO_STATIC
	@$(call install_copy, liblzo, 0, 0, 0644, $(LIBLZO_DIR)/src/liblzo2.la, /usr/lib/liblzo2.la)
  endif

	@$(call install_finish, liblzo)

	@$(call touch)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

liblzo_clean:
	rm -rf $(STATEDIR)/liblzo.*
	rm -rf $(IMAGEDIR)/liblzo_*
	rm -rf $(LIBLZO_DIR)

# vim: syntax=make