59f0d9c1f882310ed0dd6a6077ec65b926f8963d
[openwrt.git] / package / ser / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=ser
6 PKG_VERSION:=0.9.0
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=ae1f9b237f0006785ff22eafa1470ac4
9
10 PKG_SOURCE_URL:=ftp://ftp.berlios.de/pub/ser/$(PKG_VERSION)/src
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_src.tar.gz
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_CAT:=zcat
14 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
15 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
16
17 SER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops
18
19 SER_MODULE_FILES := $(foreach module,$(SER_MODULES),modules/$(module)/$(module).so)
20 SER_MODULES := $(patsubst %,modules/%,$(SER_MODULES))
21
22 $(DL_DIR)/$(PKG_SOURCE):
23 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
24
25 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE)
26 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
27 $(PATCH) $(PKG_BUILD_DIR) ./patches
28 touch $(PKG_BUILD_DIR)/.patched
29
30 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.patched
31 $(MAKE) -C $(PKG_BUILD_DIR) \
32 CC="$(TARGET_CC)" \
33 ARCH="$(ARCH)" \
34 COPTS="$(TARGET_CFLAGS)" \
35 modules="$(SER_MODULES)" \
36 modules all
37
38 $(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME)
39 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
40 mkdir -p $(PKG_IPK_DIR)/usr/sbin
41 cp -a $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_IPK_DIR)/usr/sbin/
42 -$(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
43 cp -a $(PKG_BUILD_DIR)/scripts/sc $(PKG_IPK_DIR)/usr/sbin/serctl
44 mkdir -p $(PKG_IPK_DIR)/usr/lib/ser/modules
45 (cd $(PKG_BUILD_DIR);\
46 cp -a $(SER_MODULE_FILES) $(PKG_IPK_DIR)/usr/lib/ser/modules/; \
47 )
48 $(STRIP) $(PKG_IPK_DIR)/usr/lib/ser/modules/*
49 mkdir -p $(PKG_IPK_DIR)/etc/ser
50 cp -a $(PKG_BUILD_DIR)/etc/ser.cfg $(PKG_IPK_DIR)/etc/ser/
51 mkdir -p $(PACKAGE_DIR)
52 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
53
54 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
55 $(IPKG) install $(PKG_IPK)
56
57 source: $(DL_DIR)/$(PKG_SOURCE)
58 prepare: $(PKG_BUILD_DIR)/.patched
59 compile: $(PKG_IPK)
60 install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
61
62
63 clean:
64 rm -rf $(PKG_BUILD_DIR)
65 rm -f $(PKG_IPK)
This page took 0.047687 seconds and 3 git commands to generate.