[Packages]: Fix dependencies
[openwrt/svn-archive/archive.git] / net / subversion / Makefile
1 #
2 # Copyright (C) 2007 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:=subversion
12 PKG_VERSION:=1.4.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://subversion.tigris.org/downloads/
17 PKG_MD5SUM:=d4aa5aeb09acb3307841022d279ab895
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/subversion/Default
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=A compelling replacement for CVS
29 DEPENDS:=+zlib +libneon +libintl +libapr +libaprutil
30 URL:=http://subversion.tigris.org/
31 SUBMENU:=subversion
32 endef
33
34 define Package/subversion-libs
35 $(call Package/subversion/Default)
36 TITLE:=subversion libs
37 endef
38
39 define Package/subversion-client
40 $(call Package/subversion/Default)
41 DEPENDS+=subversion-libs
42 TITLE:=subversion client tools
43 endef
44
45 define Package/subversion-server
46 $(call Package/subversion/Default)
47 DEPENDS+=subversion-libs
48 TITLE:=subversion server
49 endef
50
51 define Build/Configure
52 $(call Build/Configure/Default, \
53 --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
54 --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
55 --with-neon="$(STAGING_DIR)/usr" \
56 --disable-mod-activation \
57 --without-ruby-sitedir \
58 --without-swig \
59 --with-jikes=no \
60 --without-junit \
61 --without-berkeley-db \
62 --with-ssl \
63 --disable-neon-version-check \
64 --with-apxs=no \
65 --with-apache=no \
66 , \
67 svn_lib_neon=yes \
68 LDFLAGS="-lcrypt -lnsl -lm -lintl -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
69 -lz -L$(STAGING_DIR)/usr/lib/ \
70 -lpthread -L$(STAGING_DIR)/lib" \
71 CPPFLAGS="-I$(STAGING_DIR)/usr/include/ \
72 -I$(STAGING_DIR)/usr/lib/libintl/include \
73 -I$(STAGING_DIR)/include/" \
74 )
75 endef
76
77 define Build/Compile
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 DESTDIR="$(PKG_INSTALL_DIR)" \
80 all local-install
81 endef
82
83 define Package/subversion-libs/install
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_* $(1)/usr/lib/
86 endef
87
88 define Package/subversion-client/install
89 $(INSTALL_DIR) $(1)/usr/bin
90 $(CP) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/
91 endef
92
93 define Package/subversion-server/install
94 $(INSTALL_DIR) $(1)/usr/bin
95 $(CP) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/
96 $(INSTALL_DIR) $(1)/etc/config
97 $(INSTALL_DATA) ./files/subversion.config $(1)/etc/config/subversion
98 $(INSTALL_DIR) $(1)/etc/init.d
99 $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion
100 endef
101
102 $(eval $(call BuildPackage,subversion-libs))
103 $(eval $(call BuildPackage,subversion-client))
104 $(eval $(call BuildPackage,subversion-server))