Files
packages/net/seafile-server/Makefile
T
Alexandru Ardelean 13d843fec1 net: seafile-server: add libevent2 deps on PKG_BUILD_DEPENDS
And libevent2-pthreads to DEPENDS.

While building with -j12 I seem to get:
[ sometimes this also includes libevent2-openssl ]

```
-- EVHTP_VERSION            :  1.2.18
-- EVHTP_DISABLE_SSL        :  OFF
-- EVHTP_DISABLE_EVTHR      :  OFF
-- EVHTP_DISABLE_REGEX      :  OFF
-- EVHTP_BUILD_SHARED       :
-- EVHTP_USE_JEMALLOC       :
-- EVHTP_USE_TCMALLOC       :

-- CMAKE_BUILD_TYPE         : Release
-- CMAKE_INSTALL_PREFIX     : /usr
-- CMAKE_BINARY_DIR         : /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18
-- CMAKE_CURRENT_BINARY_DIR : /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18
-- CMAKE_CURRENT_SOURCE_DIR : /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18
-- PROJECT_BINARY_DIR       : /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18
-- PROJECT_SOURCE_DIR       : /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18
-- CMAKE_MODULE_PATH        : /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/cmake
-- CMAKE_SYSTEM_NAME        : Linux
-- CMAKE_SYSTEM_VERSION     : 1
-- CMAKE_C_COMPILER         : /home/sandu/work/openwrt/openwrt/staging_dir/toolchain-i386_pentium4_gcc-8.4.0_musl/bin/i486-openwrt-linux-musl-gcc
-- CMAKE_AR                 : /home/sandu/work/openwrt/openwrt/staging_dir/toolchain-i386_pentium4_gcc-8.4.0_musl/bin/i486-openwrt-linux-musl-gcc-ar
-- CMAKE_RANLIB             : /home/sandu/work/openwrt/openwrt/staging_dir/toolchain-i386_pentium4_gcc-8.4.0_musl/bin/i486-openwrt-linux-musl-gcc-ranlib
-- CFLAGS                   :   -Os -pipe -march=pentium4 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -ffile-prefix-map=/home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18=libevhtp-1.2.18 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro
                              -DNDEBUG

-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBEVENT_THREAD
    linked by target "evhtp" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18
    linked by target "test_proxy" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "example_basic" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "test_client" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "example_https_client" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "test_vhost" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "test_basic" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "test_extensive" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "example_chunked" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "test_query" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "test_perf" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "example_pause" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "example_https_server" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "example_vhost" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples
    linked by target "example_request_fini" in directory /home/sandu/work/openwrt/openwrt/build_dir/target-i386_pentium4_musl/libevhtp-1.2.18/examples

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_ASM_COMPILER
    CMAKE_ASM_COMPILER_ARG1
    CMAKE_MODULE_LINKER_FLAGS
    CMAKE_SHARED_LINKER_FLAGS
    DL_LIBRARY

CMake Generate step failed.  Build files cannot be regenerated correctly.
```

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2020-04-28 12:16:38 +03:00

240 lines
6.3 KiB
Makefile

#
# Copyright (C) 2007-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-server
PKG_VERSION:=7.1.3
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seafile-server/tar.gz/v$(PKG_VERSION)-server?
PKG_HASH:=79f7722a34c304adb78462194e64d6a610bd5ee40def37f4e4cdf5befed44fcd
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=AGPL-3.0-only
PKG_LICENSE_FILES:=LICENSE.txt
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-server
PKG_BUILD_DEPENDS:=vala/host libevent2 libevent2-openssl libevent2-pthreads libevhtp
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PYTHON3_PKG_BUILD:=0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include ../../lang/python/python3-package.mk
# Check that the actual Makefile version-relase match the above.
$(eval $(shell awk '/^PKG_VERSION.*=/ { print "SEAHUB_" $$$$0 }' ../seafile-seahub/Makefile))
ifneq ($(PKG_VERSION),$(SEAHUB_PKG_VERSION))
$(error $(if $(SEAHUB_PKG_VERSION), \
Version mismatch between seafile-seahub ($(SEAHUB_PKG_VERSION)) and \
seafile-server ($(PKG_VERSION)), \
Could not get PKG_VERSION from seafile-seahub Makefile))
endif
define Package/seafile-server
SECTION:=net
CATEGORY:=Network
TITLE:=Seafile server
URL:=https://seafile.com/
DEPENDS:= \
+bash \
+glib2 \
+jansson \
+libarchive \
+libevent2 \
+libevent2-openssl \
+libevent2-pthreads \
+libmariadb \
+libopenssl \
+libpthread \
+libsearpc \
+libsqlite3 \
+libuuid \
+oniguruma \
+procps-ng-pkill \
+python3-pymysql \
+python3-seafile-server \
+seafile-ccnet \
+seafile-seahub \
+sqlite3-cli \
+zlib \
$(ICONV_DEPENDS)
endef
define Package/seafile-server/description
Open source cloud storage with advanced features on privacy
protection and teamwork.
endef
define Package/seafile-server-fuse
SECTION:=net
CATEGORY:=Network
TITLE:=Seafile server - FUSE extension
URL:=https://seafile.com/
DEPENDS:= \
+bash \
+glib2 \
+jansson \
+libevent2 \
+libevent2-openssl \
+libevent2-pthreads \
+libfuse \
+libmariadb \
+libopenssl \
+libpthread \
+libsearpc \
+libsqlite3 \
+libuuid \
+procps-ng-pkill \
+seafile-ccnet \
+seafile-server \
+zlib \
$(ICONV_DEPENDS)
endef
define Package/seafile-server-fuse/description
$(call Package/seafile-server/description)
This package contains the FUSE extension (seaf-fuse) for Seafile
server.
endef
define Package/python3-seafile-server
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=Python bindings for Seafile server
DEPENDS:=+python3-light +python3-logging +python3-searpc +python3-seafile-ccnet
endef
define Package/python3-seafile-server/description
$(call Package/seafile-server/description)
This package contains Python bindings for Seafile server.
endef
CONFIGURE_ARGS += \
--disable-console \
--enable-fuse \
--enable-python \
--with-mysql="$(STAGING_DIR)/usr/bin/mysql_config"
CONFIGURE_VARS += \
PYTHON="$(HOST_PYTHON3_BIN)"
ifdef CONFIG_GCC_LIBSSP
TARGET_LDFLAGS += -lssp
endif
define Package/seafile-server/conffiles
/etc/config/seafile-server
endef
SEAFILE_SERVER_BINARIES:= \
seaf-fsck \
seafile-controller \
seaf-server \
seaf-server-init \
seafserv-gc
SEAFILE_SERVER_SHELL_SCRIPTS:= \
reset-admin.sh \
seaf-fsck.sh \
seaf-gc.sh \
seafile.sh \
seahub.sh \
setup-seafile-mysql.sh \
setup-seafile.sh
# sqlite2mysql.sh handled differently
SEAFILE_SERVER_PYTHON_SCRIPTS:= \
check_init_admin.py \
setup-seafile-mysql.py \
sqlite2mysql.py
define Package/seafile-server/install
$(INSTALL_DIR) $(1)/usr/{bin,libexec}
$(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server
$(INSTALL_DIR) $(1)/etc/{config,init.d,seafile}
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
for bin in $(SEAFILE_SERVER_BINARIES) ; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$$bin $(1)/usr/libexec/ ; \
done
for sh in $(SEAFILE_SERVER_SHELL_SCRIPTS) ; do \
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/$$$$sh $(1)/usr/bin/$$$${sh%.sh} ; \
done
mv $(1)/usr/bin/reset-admin $(1)/usr/bin/reset-seafile-admin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.sh $(1)/usr/share/seafile/seafile-server/
for py in $(SEAFILE_SERVER_PYTHON_SCRIPTS) ; do \
$(INSTALL_DATA) $(PKG_BUILD_DIR)/scripts/$$$$py $(1)/usr/share/seafile/seafile-server/ ; \
done
$(CP) $(PKG_BUILD_DIR)/scripts/{sql,upgrade} $(1)/usr/share/seafile/seafile-server/
rm -rf $(1)/usr/share/seafile/seafile-server/upgrade/win32
$(INSTALL_BIN) ./files/create-seafile-admin.sh $(1)/usr/bin/create-seafile-admin
$(INSTALL_CONF) ./files/seafile-server.config $(1)/etc/config/seafile-server
$(INSTALL_BIN) ./files/seafile-server.init $(1)/etc/init.d/seafile-server
$(INSTALL_DATA) ./files/seafile-server.upgrade $(1)/lib/upgrade/keep.d/seafile-server
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/seafile
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/seafile/*.h $(1)/usr/include/seafile/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseafile.pc $(1)/usr/lib/pkgconfig/
endef
define Package/seafile-server-fuse/install
$(INSTALL_DIR) $(1)/usr/{bin,libexec}
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/seaf-fuse $(1)/usr/libexec/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/seaf-fuse.sh $(1)/usr/bin/seaf-fuse
endef
Py3Package/python3-seafile-server/install:=:
define Package/seafile-server/postinst
#!/bin/sh
cat << EOF
Please see:
https://github.com/openwrt/packages/blob/master/net/seafile-server/README.md
for OpenWrt-specific installation notes (in particular, if you are
upgrading from a version before 7.1).
EOF
[ -z "$$IPKG_INSTROOT" ] || exit 0
cat << EOF
opkg will attempt to start Seafile server now. This may fail if you have
not set up Seafile server before or if you are upgrading and have not
run the upgrade scripts.
EOF
endef
$(eval $(call BuildPackage,seafile-server))
$(eval $(call BuildPackage,seafile-server-fuse))
$(eval $(call Py3Package,python3-seafile-server))
$(eval $(call BuildPackage,python3-seafile-server))
$(eval $(call BuildPackage,python3-seafile-server-src))