change cp to $(CP)
[openwrt.git] / package / openser / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openser
6 PKG_VERSION:=1.0.0
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=f60f5a51772c5b06abaa1c81e9539077
9 # PKG_VARIANT:=-tls for tls version
10 PKG_VARIANT:=
11
12 PKG_SOURCE_URL:=http://openser.org/pub/openser/$(PKG_VERSION)/src
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz
14 PKG_CAT:=zcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 include $(TOPDIR)/package/rules.mk
20
21 $(eval $(call PKG_template,OPENSER,openser,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23 # Select here the modules for the ipk package
24 OPENSER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops exec
25
26 OPENSER_MODULE_FILES := $(foreach module,$(OPENSER_MODULES),modules/$(module)/$(module).so)
27 OPENSER_MODULES := $(patsubst %,modules/%,$(OPENSER_MODULES))
28
29 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
30 touch $@
31
32 $(PKG_BUILD_DIR)/.built:
33 $(MAKE) -C $(PKG_BUILD_DIR) \
34 prefix=/ \
35 extra_defs="-DUSE_PTHREAD_MUTEX " \
36 CC="$(TARGET_CC)" \
37 ARCH="$(ARCH)" \
38 CFLAGS="$(TARGET_CFLAGS)" \
39 LOCALBASE="$(STAGING_DIR)/usr" \
40 all utils/gen_ha1/gen_ha1
41 touch $@
42
43 $(IPKG_OPENSER):
44 mkdir -p $(IDIR_OPENSER)/usr/sbin
45 $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_OPENSER)/usr/sbin/
46 $(CP) $(PKG_BUILD_DIR)/utils/gen_ha1/gen_ha1 $(IDIR_OPENSER)/usr/sbin/openser_gen_ha1
47 $(CP) $(PKG_BUILD_DIR)/scripts/sc $(IDIR_OPENSER)/usr/sbin/openserctl
48 chmod 744 $(IDIR_OPENSER)/usr/sbin/openserctl
49 $(CP) $(PKG_BUILD_DIR)/scripts/sc.dbtext $(IDIR_OPENSER)/usr/sbin/dbtextctl
50 chmod 744 $(IDIR_OPENSER)/usr/sbin/dbtextctl
51 mkdir -p $(IDIR_OPENSER)/usr/lib/openser/modules
52 (cd $(PKG_BUILD_DIR);\
53 $(CP) $(OPENSER_MODULE_FILES) $(IDIR_OPENSER)/usr/lib/openser/modules/; \
54 )
55 mkdir -p $(IDIR_OPENSER)/etc/openser
56 $(CP) $(PKG_BUILD_DIR)/etc/openser.cfg $(IDIR_OPENSER)/etc/openser/
57 $(RSTRIP) $(IDIR_OPENSER)
58 $(IPKG_BUILD) $(IDIR_OPENSER) $(PACKAGE_DIR)
This page took 0.047035 seconds and 5 git commands to generate.