diff --git a/package/links/files-skel/usr/share/tuxbox/neutrino/plugins/links.cfg b/package/links/files/links.cfg similarity index 100% rename from package/links/files-skel/usr/share/tuxbox/neutrino/plugins/links.cfg rename to package/links/files/links.cfg diff --git a/package/links/links.mk b/package/links/links.mk index 53f0bf9e..33631b8b 100644 --- a/package/links/links.mk +++ b/package/links/links.mk @@ -9,22 +9,7 @@ LINKS_DIR = links-$(LINKS_VERSION) LINKS_SOURCE = links-$(LINKS_VERSION).tar.bz2 LINKS_SITE = http://links.twibright.com/download -$(DL_DIR)/$(LINKS_SOURCE): - $(download) $(LINKS_SITE)/$(LINKS_SOURCE) - -LINKS_DEPENDENCIES = libpng libjpeg-turbo openssl - -LINKS_PATCH = links.patch -LINKS_PATCH += links-ac-prog-cxx.patch -LINKS_PATCH += links-accept_https_play.patch - -ifeq ($(BOXTYPE),$(filter $(BOXTYPE),coolstream)) - LINKS_PATCH += links-input-nevis_ir.patch -else ifeq ($(BOXMODEL),$(filter $(BOXMODEL),hd51 bre2ze4k)) - LINKS_PATCH += links-input-event1.patch -else ifeq ($(BOXMODEL),$(filter $(BOXMODEL),h7)) - LINKS_PATCH += links-input-event2.patch -endif +LINKS_DEPENDENCIES = libpng libjpeg-turbo openssl zlib LINKS_AUTORECONF = YES @@ -32,7 +17,8 @@ LINKS_CONF_OPTS = \ --enable-graphics \ --with-fb \ --with-libjpeg \ - --with-ssl=$(TARGET_DIR) \ + --with-ssl=$(TARGET_DIR) --enable-ssl-pkgconfig \ + --with-zlib \ --without-atheos \ --without-directfb \ --without-libtiff \ @@ -41,20 +27,41 @@ LINKS_CONF_OPTS = \ --without-svgalib \ --without-x -links: $(LINKS_DEPENDENCIES) $(DL_DIR)/$(LINKS_SOURCE) $(SHARE_PLUGINS) | $(TARGET_DIR) - $(REMOVE)/$(LINKS_DIR) - $(UNTAR)/$(LINKS_SOURCE) - $(CHDIR)/$(LINKS_DIR)/intl; \ - $(SED) 's|^T_SAVE_HTML_OPTIONS,.*|T_SAVE_HTML_OPTIONS, "HTML-Optionen speichern",|' german.lng; \ - echo "english" > index.txt; \ - echo "german" >> index.txt; \ +ifeq ($(BOXTYPE),$(filter $(BOXTYPE),coolstream)) +define LINKS_PATCH_RCINPUT_C + $(SED) 's|"/dev/input/event0"|"/dev/input/nevis_ir"|' $(PKG_BUILD_DIR)/rcinput.c +endef +else ifeq ($(BOXMODEL),$(filter $(BOXMODEL),hd51 bre2ze4k)) +define LINKS_PATCH_RCINPUT_C + $(SED) 's|"/dev/input/event0"|"/dev/input/event1"|' $(PKG_BUILD_DIR)/rcinput.c +endef +else ifeq ($(BOXMODEL),$(filter $(BOXMODEL),h7)) +define LINKS_PATCH_RCINPUT_C + $(SED) 's|"/dev/input/event0"|"/dev/input/event2"|' $(PKG_BUILD_DIR)/rcinput.c +endef +endif +LINKS_POST_PATCH_HOOKS += LINKS_PATCH_RCINPUT_C + +define LINKS_PREPARE_INTL + $(SED) 's|^T_SAVE_HTML_OPTIONS,.*|T_SAVE_HTML_OPTIONS, "HTML-Optionen speichern",|' $(PKG_BUILD_DIR)/intl/german.lng + echo "english" > $(PKG_BUILD_DIR)/intl/index.txt + echo "german" >> $(PKG_BUILD_DIR)/intl/index.txt + $(CHDIR)/$($(PKG)_DIR)/intl; \ ./gen-intl - $(call APPLY_PATCHES,$(LINKS_PATCH)) - $(CHDIR)/$(LINKS_DIR); \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) +endef +LINKS_POST_PATCH_HOOKS += LINKS_PREPARE_INTL + +define LINKS_INSTALL_AS_NEUTRINO_PLUGIN + $(INSTALL) -d $(SHARE_PLUGINS) mv -f $(TARGET_bindir)/links $(SHARE_PLUGINS)/links.so + $(INSTALL_DATA) $(PKG_FILES_DIR)/links.cfg $(SHARE_PLUGINS)/links.cfg +endef +LINKS_TARGET_FINALIZE_HOOKS += LINKS_INSTALL_AS_NEUTRINO_PLUGIN + +define LINKS_INSTALL_SKEL $(INSTALL_COPY) $(PKG_FILES_DIR)-skel/* $(TARGET_DIR)/ - $(REMOVE)/$(LINKS_DIR) - $(TOUCH) +endef +LINKS_TARGET_FINALIZE_HOOKS += LINKS_INSTALL_SKEL + +links: | $(TARGET_DIR) + $(call autotools-package) diff --git a/package/links/patches/links.patch b/package/links/patches/0001-port-to-neutrino.patch similarity index 100% rename from package/links/patches/links.patch rename to package/links/patches/0001-port-to-neutrino.patch diff --git a/package/links/patches/links-ac-prog-cxx.patch b/package/links/patches/0002-ac-prog-cxx.patch similarity index 100% rename from package/links/patches/links-ac-prog-cxx.patch rename to package/links/patches/0002-ac-prog-cxx.patch diff --git a/package/links/patches/links-accept_https_play.patch b/package/links/patches/0003-accept_https_play.patch similarity index 100% rename from package/links/patches/links-accept_https_play.patch rename to package/links/patches/0003-accept_https_play.patch diff --git a/package/links/patches/links-input-event1.patch b/package/links/patches/links-input-event1.patch deleted file mode 100644 index 4fca7580..00000000 --- a/package/links/patches/links-input-event1.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/rcinput.c -+++ b/rcinput.c -@@ -151,7 +151,7 @@ - { - char buf[32]; - //KbInitialize(); -- fd = open("/dev/input/event0", O_RDONLY); -+ fd = open("/dev/input/event1", O_RDONLY); - - if (fd == -1) - { diff --git a/package/links/patches/links-input-event2.patch b/package/links/patches/links-input-event2.patch deleted file mode 100644 index 986ebcbb..00000000 --- a/package/links/patches/links-input-event2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/rcinput.c -+++ b/rcinput.c -@@ -151,7 +151,7 @@ - { - char buf[32]; - //KbInitialize(); -- fd = open("/dev/input/event0", O_RDONLY); -+ fd = open("/dev/input/event2", O_RDONLY); - - if (fd == -1) - { diff --git a/package/links/patches/links-input-nevis_ir.patch b/package/links/patches/links-input-nevis_ir.patch deleted file mode 100644 index 3f9490bc..00000000 --- a/package/links/patches/links-input-nevis_ir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/rcinput.c -+++ b/rcinput.c -@@ -151,7 +151,7 @@ - { - char buf[32]; - //KbInitialize(); -- fd = open("/dev/input/event0", O_RDONLY); -+ fd = open("/dev/input/nevis_ir", O_RDONLY); - - if (fd == -1) - {