3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=3e2e12c8dfbd7dad9199304093de0838
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
)
14 PKG_IPK
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
15 PKG_IPK_DIR
:=$(PKG_BUILD_DIR
)/ipkg
17 SER_MODULES
:= sl tm rr maxfwd usrloc registrar dbtext textops nathelper
19 SER_MODULE_FILES
:= $(foreach module
,$(SER_MODULES
),modules
/$(module
)/$(module
).so
)
20 SER_MODULES
:= $(patsubst %,modules
/%,$(SER_MODULES
))
22 $(DL_DIR
)/$(PKG_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
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
30 $(PKG_BUILD_DIR
)/$(PKG_NAME
): $(PKG_BUILD_DIR
)/.patched
31 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
32 extra_defs
="-DUSE_PTHREAD_MUTEX " \
35 CFLAGS
="$(TARGET_CFLAGS)" \
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
/; \
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
)
54 $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
: $(PKG_IPK
)
55 $(IPKG
) install $(PKG_IPK
)
57 source
: $(DL_DIR
)/$(PKG_SOURCE
)
58 prepare
: $(PKG_BUILD_DIR
)/.patched
60 install: $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
64 rm -rf
$(PKG_BUILD_DIR
)