SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.03k stars 1.23k forks source link

Compiling jackett for rtd1296 #3015

Closed kianrafiee closed 6 years ago

kianrafiee commented 6 years ago

I followed the guide and even tested that I could build another package first. I tested builing beets first for rtd1296-6.1 toolchain. It created a package in /packages/

However, after cross compiling jackett. It creates a work directory which I followed the guide to then take the plist there and add it to spk/jackett with rsc: in front of every share.

Then i created the digest in terminal.

Then I copied and put the PLIST and the MAKEFILE into spk/jackett and then tried to compile by running "make arch-rtd1296-6.1"

The problem is it keeps doing the same thing that happens when you cross compile which is create a work directory. It doesnt create a package.

Here is the terminal text:

make arch-rtd1296-6.1
===>  Building package for arch rtd1296-6.1
make[1]: Entering directory '/home/kian/spksrc/spk/jackett-rtd1296'
===>  Set up toolchain 
make[2]: Nothing to be done for 'default'.
===>  Downloading files for Jackett
===>    File Jackett-0.7.1483.tar.gz already downloaded
===>  Verifying files for Jackett
===>  No digests file for Jackett
/home/kian/spksrc/spk/jackett-rtd1296/../../distrib/Jackett-0.7.1483.tar.gz
===>  Processing dependencies of Jackett
===>  Extracting for Jackett
tar -xzpf /home/kian/spksrc/spk/jackett-rtd1296/../../distrib/Jackett-0.7.1483.tar.gz -C /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1 
===>  Patching for Jackett
===>  Configuring for Jackett
===>  Compiling for Jackett
===>  Installing for Jackett
find /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1/install//usr/local/ \! -type d -printf '%P\n' | sort > /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1/Jackett.plist.tmp
mkdir -p /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1/install/usr/local/share/jackett
tar -cf - -C /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1/Jackett . | tar -xf - -C /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1/install/usr/local/share/jackett
find /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1/install//usr/local/ \! -type d -printf '%P\n' | sort | \
  diff /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1/Jackett.plist.tmp -  | grep '>' | cut -d' ' -f2- > /home/kian/spksrc/spk/jackett-rtd1296/work-rtd1296-6.1/Jackett.plist
make[1]: Leaving directory '/home/kian/spksrc/spk/jackett-rtd1296'

Does it have anything to do with my Makefile for jackett? This is it:

PKG_NAME = Jackett
PKG_VERS = 0.7.1483
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME).Binaries.Mono.$(PKG_EXT)
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/Jackett/Jackett/releases/download/v$(PKG_VERS)
PKG_DIR = jackett

DEPENDS =

HOMEPAGE = https://github.com/Jackett/Jackett
COMMENT  = Jackett works as a proxy server: it translates queries from apps into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
LICENSE  = GNU GPL v2

CONFIGURE_TARGET = nop
COMPILE_TARGET = nop
INSTALL_TARGET = myInstall

include ../../mk/spksrc.cross-cc.mk

myInstall:
    mkdir -p $(STAGING_INSTALL_PREFIX)/share/$(PKG_DIR)
    tar -cf - -C $(WORK_DIR)/$(PKG_NAME) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/share/$(PKG_DIR)
kianrafiee commented 6 years ago

OK I realized I was using the wrong Makefile.

So now my makefile is:

SPK_NAME = jackett
SPK_VERS = 0.7.1483
SPK_REV = 4
SPK_ICON = src/jackett.png
DSM_UI_DIR = app

DEPENDS = cross/busybox cross/curl cross/$(SPK_NAME)
SPK_DEPENDS = "mono>=4.2.1.102-6"

MAINTAINER = SynoCommunity
DESCRIPTION = "Jackett works as a proxy server: it translates queries from apps into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps."
ADMIN_PORT = 9117
RELOAD_UI = yes
DISPLAY_NAME = Jackett
BETA = 1
CHANGELOG = Updated to version 0.7.1483

HOMEPAGE = https://github.com/Jackett/Jackett
LICENSE  = GPLv2

INSTALLER_SCRIPT = src/installer.sh
SSS_SCRIPT       = src/dsm-control.sh
FWPORTS          = src/${SPK_NAME}.sc
CONF_DIR         = src/conf/

INSTALL_PREFIX = /usr/local/$(SPK_NAME)

POST_STRIP_TARGET = jackett_extra_install

REQUIRED_DSM = 5.0
UNSUPPORTED_ARCHS = $(PPC_ARCHES)

BUSYBOX_CONFIG = usrmng daemon
ENV += BUSYBOX_CONFIG="$(BUSYBOX_CONFIG)"

include ../../mk/spksrc.spk.mk

.PHONY: jackett_extra_install
jackett_extra_install:
    install -m 755 -d $(STAGING_DIR)/var
    install -m 755 -d $(STAGING_DIR)/var/.config
    install -m 755 -d $(STAGING_DIR)/var/.config/Jackett
    install -m 755 -d $(STAGING_DIR)/app
    install -m 644 src/app/config $(STAGING_DIR)/app/config

And compiling gets to here and then errors out:

===>  Processing dependencies of curl
make[3]: Entering directory '/home/kian/spksrc/cross/zlib'
make[3]: Nothing to be done for 'default'.
make[3]: Leaving directory '/home/kian/spksrc/cross/zlib'
make[3]: Entering directory '/home/kian/spksrc/cross/openssl'
===>  Downloading files for openssl
wget ftp://ftp.openssl.org/source/openssl-1.0.2l.tar.gz
No such file ‘openssl-1.0.2l.tar.gz’.

../../mk/spksrc.download.mk:56: recipe for target 'download_target' failed
make[3]: *** [download_target] Error 8
make[3]: Leaving directory '/home/kian/spksrc/cross/openssl'
../../mk/spksrc.depend.mk:44: recipe for target 'depend_target' failed
make[2]: *** [depend_target] Error 2
make[2]: Leaving directory '/home/kian/spksrc/cross/curl'
../../mk/spksrc.depend.mk:44: recipe for target 'depend_target' failed
make[1]: *** [depend_target] Error 2
make[1]: Leaving directory '/home/kian/spksrc/spk/jackett-rtd1296'
../../mk/spksrc.spk.mk:419: recipe for target 'arch-rtd1296-6.1' failed
make: [arch-rtd1296-6.1] Error 2 (ignored)

Anyone know what I need to do?

kianrafiee commented 6 years ago

OK I figured out I had to change the makefile for openssl to point to latest stable version.

Now I compiled jackett for rtd1296-6.1 successfully BUT upon installing in DSM it will not start :(

kianrafiee commented 6 years ago

I got kaso17 from Jackett repo to assist me yesterday. He had me run jackett in debug mode and issue a command in terminal and it actually was operational and could be updated to latest version. However, I cannot start it from package center, only run in debug mode which wont be of much use to me. Seems he was going to elaborate on what to do next(talking about changing a variable) but I think he was busy last night. Here is the issue: Issue #1985

cytec commented 6 years ago

that's most likely because the scripts aren't updated to work with DSM6 currently?

kianrafiee commented 6 years ago

@cytec anything I can do to resolve it? I used the mono 5.x dsm 6.1 sources from @m4tt075 repo and the jackett dsm 6.1 version sources of spksrc repo when i compiled them.

ymartin59 commented 6 years ago

Related to #3070

kianrafiee commented 6 years ago

I think this issue can be marked resolved now. @Safihre jackett package for rtd1296 in his fork of this repo works well on my system after some slight hiccups.

m4tt075 commented 6 years ago

Cool. You can close it yourself, as you have opened it... ;-)