690f10d50223a9dbc2227fc94ca0606a621b76fe
[openwrt/svn-archive/archive.git] / net / subversion / Makefile
1 #
2 # Copyright (C) 2007-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=subversion
11 PKG_VERSION:=1.6.17
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://subversion.tigris.org/downloads
16 PKG_MD5SUM:=81e5dc5beee4b3fc025ac70c0b6caa14
17
18 PKG_FIXUP:=libtool
19 PKG_MACRO_PATHS:=build/ac-macros
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/subversion/Default
24 SECTION:=net
25 CATEGORY:=Network
26 TITLE:=A compelling replacement for CVS
27 DEPENDS:=+zlib +libneon +libaprutil
28 URL:=http://subversion.apache.org/
29 SUBMENU:=Version Control Systems
30 endef
31
32 define Package/subversion/Default/description
33 Subversion is a free/open-source version control system. That is,
34 Subversion manages files and directories, and the changes made to them,
35 over time. This allows you to recover older versions of your data, or
36 examine the history of how your data changed. In this regard, many
37 people think of a version control system as a sort of time machine.
38 endef
39
40 define Package/subversion-libs
41 $(call Package/subversion/Default)
42 TITLE:=subversion libs
43 endef
44
45 define Package/subversion-libs/description
46 $(call Package/subversion/Default/description)
47 This package contains the subversion libraries.
48 endef
49
50 define Package/subversion-client
51 $(call Package/subversion/Default)
52 DEPENDS+=subversion-libs
53 TITLE:=subversion client tools
54 endef
55
56 define Package/subversion-client/description
57 $(call Package/subversion/Default/description)
58 This package contains the subversion client tools.
59 endef
60
61 define Package/subversion-server
62 $(call Package/subversion/Default)
63 DEPENDS+=subversion-libs
64 TITLE:=subversion server
65 endef
66
67 define Package/subversion-server/description
68 $(call Package/subversion/Default/description)
69 This package contains the subversion server.
70 endef
71
72 define Package/subversion-server/conffiles
73 /etc/config/subversion
74 endef
75
76 TARGET_CFLAGS += $(FPIC)
77 TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
78
79 CONFIGURE_ARGS += \
80 --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
81 --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
82 --with-neon="$(STAGING_DIR)/usr" \
83 --disable-mod-activation \
84 --without-ruby-sitedir \
85 --without-swig \
86 --with-jikes=no \
87 --without-junit \
88 --without-berkeley-db \
89 --with-ssl \
90 --disable-neon-version-check \
91 --with-apxs=no \
92 --without-sasl \
93
94 CONFIGURE_VARS += \
95 svn_lib_neon=yes \
96 LDFLAGS="$(TARGET_LDFLAGS) -lcrypt -lm \
97 -lz -lpthread -L$(TOOLCHAIN_DIR)/usr/lib \
98 -L$(TOOLCHAIN_DIR)/lib" \
99 CPPFLAGS="$(TARGET_CPPFLAGS)" \
100
101 define Build/Compile
102 $(MAKE) -C $(PKG_BUILD_DIR) \
103 DESTDIR="$(PKG_INSTALL_DIR)" \
104 all local-install
105 endef
106
107 define Package/subversion-libs/install
108 $(INSTALL_DIR) $(1)/usr/lib
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
110 endef
111
112 define Package/subversion-client/install
113 $(INSTALL_DIR) $(1)/usr/bin
114 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/
115 endef
116
117 define Package/subversion-server/install
118 $(INSTALL_DIR) $(1)/usr/bin
119 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/
120 $(INSTALL_DIR) $(1)/etc/config
121 $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion
122 $(INSTALL_DIR) $(1)/etc/init.d
123 $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion
124 endef
125
126 $(eval $(call BuildPackage,subversion-libs))
127 $(eval $(call BuildPackage,subversion-client))
128 $(eval $(call BuildPackage,subversion-server))