Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大佬,你的源码编译后无执行权限,我重新写了一个赋予执行权限的makefile #1

Closed
zxlhhyccc opened this issue Jul 5, 2019 · 12 comments

Comments

@zxlhhyccc
Copy link

No description provided.

@ydch
Copy link

ydch commented Jul 6, 2019

编译后的确无执行权限。你的makefile能看看吗

@zxlhhyccc
Copy link
Author

编译后的确无执行权限。你的makefile能看看吗

怎么看?

@ZeaKyX
Copy link

ZeaKyX commented Jul 8, 2019

编译后的确无执行权限。你的makefile能看看吗

不知你解决没有,把chmod改成755应该就行

@zxlhhyccc
Copy link
Author

编译后的确无执行权限。你的makefile能看看吗

不知你解决没有,把chmod改成755应该就行

改成755也是没用,我另外写了makefile

@zxlhhyccc
Copy link
Author

Copyright (C) 2016 Openwrt.org

This is free software, licensed under the Apache License, Version 2.0 .

include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-serverchan
PKG_VERSION:=1.0
PKG_RELEASE:=40

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/luci-app-serverchan
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI Support for serverchan on or off
DEPENDS:=+iputils-arping +curl
endef

define Package/luci-app-serverchan/description
LuCI support for serverchan
endef

define Build/Prepare
endef

define Build/Compile
endef

define Package/luci-app-serverchan/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci
$(INSTALL_DIR) $(1)/
cp -pR ./root/* $(1)/
endef

define Package/luci-app-serverchan/postinst
#!/bin/sh
chmod 755 /etc/init.d/serverchan >/dev/null 2>&1
chmod 755 /usr/bin/serverchan/serverchan >/dev/null 2>&1
/etc/init.d/serverchan enable >/dev/null 2>&1
exit 0
endef

define Package/luci-app-serverchan/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/serverchan disable
/etc/init.d/serverchan stop
fi
exit 0
endef

$(eval $(call BuildPackage,luci-app-serverchan))
拿去用吧。。。。

@zxlhhyccc
Copy link
Author

编译后的确无执行权限。你的makefile能看看吗

不知你解决没有,把chmod改成755应该就行

也可以在这里pull我的修改后的:
https://github.com/zxlhhyccc/luci-app-serverchan

@ZeaKyX
Copy link

ZeaKyX commented Jul 10, 2019

编译后的确无执行权限。你的makefile能看看吗

不知你解决没有,把chmod改成755应该就行

也可以在这里pull我的修改后的:
https://github.com/zxlhhyccc/luci-app-serverchan

多谢

@hong0980
Copy link

大佬路由器的上传下载的流量能写进去吗

@tty228
Copy link
Owner

tty228 commented Sep 9, 2019

好的,你提交一下还是我直接改了

@hong0980
Copy link

hong0980 commented Sep 9, 2019

好的,你提交一下还是我直接改了

大佬还是你修改下,有空顺便把路由器的上传下载的流量推送能写进去。期待新版!!!!

@rhww
Copy link

rhww commented Sep 13, 2019

编译后的确无执行权限。你的makefile能看看吗

不知你解决没有,把chmod改成755应该就行

也可以在这里pull我的修改后的:
https://github.com/zxlhhyccc/luci-app-serverchan

我用你的也不能运行,尴尬啊。

@hong0980
Copy link

编译后的确无执行权限。你的makefile能看看吗

不知你解决没有,把chmod改成755应该就行

也可以在这里pull我的修改后的:
https://github.com/zxlhhyccc/luci-app-serverchan

我用你的也不能运行,尴尬啊。

`# Copyright (C) 2016 Openwrt.org

This is free software, licensed under the Apache License, Version 2.0 .

include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-serverchan
PKG_VERSION:=1.0
PKG_RELEASE:=50

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/luci-app-serverchan
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=LuCI Support for serverchan on or off
DEPENDS:=+iputils-arping +curl
endef

define Package/luci-app-serverchan/description
LuCI support for serverchan
endef

define Build/Prepare
endef

define Build/Compile
endef

define Package/luci-app-serverchan/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci
$(INSTALL_DIR) $(1)/
cp -pR ./root/* $(1)/
endef

define Package/$(PKG_NAME)/postinst
#!/bin/sh
chmod 755 $${IPKG_INSTROOT}/etc/init.d/serverchan >/dev/null 2>&1
chmod 755 $${IPKG_INSTROOT}/usr/bin/serverchan/serverchan >/dev/null 2>&1
/etc/init.d/serverchan enable >/dev/null 2>&1
exit 0
endef

define Package/luci-app-serverchan/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/serverchan disable
/etc/init.d/serverchan stop
fi
exit 0
endef

$(eval $(call BuildPackage,luci-app-serverchan))`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants