9ab24dafd94336e1004e710a2651197aa2bb548a
[openwrt/svn-archive/archive.git] / net / mercurial / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=mercurial
12 PKG_VERSION:=1.0.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE_URL:=http://selenic.com/mercurial/release/
16 PKG_SOURCE:=mercurial-$(PKG_VERSION).tar.gz
17 PKG_MD5SUM:=32432616f517107e6582721c257cd1f4
18 PKG_BUILD_DEPENDS:=python
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/mercurial
23 SECTION:=net
24 CATEGORY:=Network
25 DEPENDS:=python
26 TITLE:=Mercurial Source Control Management (SCM) system
27 URL:=http://www.selenic.com/mercurial/
28 endef
29
30 define Package/mercurial/description
31 A fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects.
32 endef
33
34 HG_BUILDOPTS= \
35 CC="$(TARGET_CC)" \
36 LDSHARED="$(TARGET_CC) -shared" \
37 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python2.5/" \
38 LDFLAGS="-L$(STAGING_DIR)/usr/lib -lpython2.5"
39
40 define Build/Compile
41 (cd $(PKG_BUILD_DIR); \
42 $(HG_BUILDOPTS) /usr/bin/python setup.py build; \
43 );
44 (cd $(PKG_BUILD_DIR); \
45 /usr/bin/python setup.py install --prefix="$(PKG_INSTALL_DIR)"; \
46 );
47 endef
48
49 define Package/mercurial/install
50 $(INSTALL_DIR) $(1)/usr/bin
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/bin $(1)/usr
53 $(CP) $(PKG_INSTALL_DIR)/lib $(1)/usr
54 endef
55
56 $(eval $(call BuildPackage,mercurial))