You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.0 KiB

  1. #
  2. # Copyright (C) 2007-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=subversion
  9. PKG_RELEASE:=1
  10. PKG_VERSION:=1.9.6
  11. PKG_SOURCE_URL:=@APACHE/subversion
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_HASH:=dbcbc51fb634082f009121f2cb64350ce32146612787ffb0f7ced351aacaae19
  14. PKG_MD5SUM:=f27e00338d4a9f7f9aec9d4a3f8b418b
  15. PKG_LICENSE:=Apache-2.0
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
  18. PKG_FIXUP:=autoreconf
  19. PKG_MACRO_PATHS:=build/ac-macros
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/subversion/Default
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=Version Control Systems
  26. TITLE:=A compelling replacement for CVS
  27. DEPENDS:=+zlib +libsqlite3 +PACKAGE_unixodbc:unixodbc +libapr +libaprutil +libmagic \
  28. $(ICONV_DEPENDS) $(INTL_DEPENDS)
  29. URL:=http://subversion.apache.org/
  30. endef
  31. define Package/subversion/Default/description
  32. Subversion is a free/open-source version control system. That is,
  33. Subversion manages files and directories, and the changes made to them,
  34. over time. This allows you to recover older versions of your data, or
  35. examine the history of how your data changed. In this regard, many
  36. people think of a version control system as a sort of time machine.
  37. endef
  38. define Package/subversion-libs
  39. $(call Package/subversion/Default)
  40. TITLE:=subversion libs
  41. endef
  42. define Package/subversion-libs/description
  43. $(call Package/subversion/Default/description)
  44. This package contains the Subversion libraries.
  45. endef
  46. define Package/subversion-client
  47. $(call Package/subversion/Default)
  48. DEPENDS:=+subversion-libs
  49. TITLE:=subversion client tools
  50. endef
  51. define Package/subversion-client/description
  52. $(call Package/subversion/Default/description)
  53. This package contains the Subversion client tools.
  54. endef
  55. define Package/subversion-server
  56. $(call Package/subversion/Default)
  57. DEPENDS:=+subversion-libs
  58. TITLE:=subversion server
  59. endef
  60. define Package/subversion-server/description
  61. $(call Package/subversion/Default/description)
  62. This package contains the Subversion server.
  63. endef
  64. define Package/subversion-server/conffiles
  65. /etc/config/subversion
  66. endef
  67. TARGET_CFLAGS += $(FPIC)
  68. TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  69. APU_LIBS=$(shell $(STAGING_DIR)/usr/bin/apu-1-config --link-libtool --libs)
  70. CONFIGURE_ARGS += \
  71. --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
  72. --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
  73. --with-libmagic="$(STAGING_DIR)/usr" \
  74. --disable-mod-activation \
  75. --without-ruby-sitedir \
  76. --without-swig \
  77. --without-jikes \
  78. --without-junit \
  79. --without-berkeley-db \
  80. --without-apxs \
  81. --without-sasl
  82. ifdef $(INTL_FULL)
  83. CONFIGURE_ARGS += --enable-nls
  84. else
  85. CONFIGURE_ARGS += --disable-nls
  86. endif
  87. CONFIGURE_VARS += \
  88. LDFLAGS="$(TARGET_LDFLAGS) $(APU_LIBS) -lcrypt -lm \
  89. -lz -lpthread $(if $(INTL_FULL),-lintl)"
  90. CPPFLAGS="$(TARGET_CPPFLAGS)"
  91. define Build/Compile
  92. $(MAKE) -C $(PKG_BUILD_DIR) \
  93. DESTDIR="$(PKG_INSTALL_DIR)" \
  94. all local-install
  95. endef
  96. define Package/subversion-libs/install
  97. $(INSTALL_DIR) $(1)/usr/lib
  98. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
  99. endef
  100. define Package/subversion-client/install
  101. $(INSTALL_DIR) $(1)/usr/bin
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/
  103. endef
  104. define Package/subversion-server/install
  105. $(INSTALL_DIR) $(1)/usr/bin
  106. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/
  107. $(INSTALL_DIR) $(1)/etc/config
  108. $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion
  109. $(INSTALL_DIR) $(1)/etc/init.d
  110. $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion
  111. endef
  112. define Package/subversion-server/prerm
  113. #!/bin/sh
  114. ps | grep '\(/svnserve$\| svnserve\)' | grep -cvq grep >/dev/null && /etc/init.d/subversion stop
  115. /etc/init.d/subversion disable
  116. endef
  117. $(eval $(call BuildPackage,subversion-libs))
  118. $(eval $(call BuildPackage,subversion-client))
  119. $(eval $(call BuildPackage,subversion-server))