Skip to content

Commit

Permalink
fix: convert crlf to lf
Browse files Browse the repository at this point in the history
Signed-off-by: qwq233 <qwq233@qwq2333.top>
  • Loading branch information
qwq233 committed Oct 13, 2024
1 parent ed6e1dd commit 3558bdd
Show file tree
Hide file tree
Showing 12 changed files with 1,483 additions and 1,481 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
1,318 changes: 659 additions & 659 deletions LICENSE.md

Large diffs are not rendered by default.

106 changes: 53 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=ua4f
PKG_VERSION:=0.1.0
PKG_MAINTAINER := James Clef <qwq233@qwq2333.top>

PKG_LICENSE:=AGPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE.md

HOST_BUILD_DEPENDS:=rust/host

include $(INCLUDE_DIR)/package.mk
include ./rustc_targets.mk

define Package/ua4f
SECTION:=net
CATEGORY:=Network
TITLE:=UA4F
endef

define Package/ua4f/description
Another User Agent faker, allowing users to bypass multi device detection for Campus Network via socks5 proxy.
endef

define Build/Prepare
$(call Build/Prepare/Default)
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./* $(PKG_BUILD_DIR)/
sed -i 's/0.1.0/$(PKG_VERSION)/g' $(PKG_BUILD_DIR)/Cargo.toml
sed -i 's/0.1.0/$(PKG_VERSION)/g' $(PKG_BUILD_DIR)/openwrt/usr/lib/lua/luci/controller/ua4f.lua
endef

define Build/Compile
cd $(PKG_BUILD_DIR) && cargo rustc --target=$(RUSTC_TARGET_ARCH) --release $(NEED_BUILD_STD) -- -C linker=$(TARGET_CC_NOCACHE) -C ar=$(TARGET_AR)
stat $(PKG_BUILD_DIR)/target/$(RUSTC_TARGET_ARCH)/release/ua4f
endef

define Package/ua4f/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/target/$(RUSTC_TARGET_ARCH)/release/ua4f $(1)/usr/bin/ua4f

$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/etc/config/ua4f $(1)/etc/config/ua4f

$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/etc/init.d/ua4f $(1)/etc/init.d/ua4f

$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/usr/lib/lua/luci/controller/ua4f.lua $(1)/usr/lib/lua/luci/controller/ua4f.lua
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/usr/lib/lua/luci/model/cbi/ua4f.lua $(1)/usr/lib/lua/luci/model/cbi/ua4f.lua
endef

include $(TOPDIR)/rules.mk

PKG_NAME:=ua4f
PKG_VERSION:=0.1.1
PKG_MAINTAINER := James Clef <qwq233@qwq2333.top>

PKG_LICENSE:=AGPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE.md

HOST_BUILD_DEPENDS:=rust/host

include $(INCLUDE_DIR)/package.mk
include ./rustc_targets.mk

define Package/ua4f
SECTION:=net
CATEGORY:=Network
TITLE:=UA4F
endef

define Package/ua4f/description
Another User Agent faker, allowing users to bypass multi device detection for Campus Network via socks5 proxy.
endef

define Build/Prepare
$(call Build/Prepare/Default)
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./* $(PKG_BUILD_DIR)/
sed -i 's/0.1.0/$(PKG_VERSION)/g' $(PKG_BUILD_DIR)/Cargo.toml
sed -i 's/0.1.0/$(PKG_VERSION)/g' $(PKG_BUILD_DIR)/openwrt/usr/lib/lua/luci/controller/ua4f.lua
endef

define Build/Compile
cd $(PKG_BUILD_DIR) && cargo rustc --target=$(RUSTC_TARGET_ARCH) --release $(NEED_BUILD_STD) -- -C linker=$(TARGET_CC_NOCACHE) -C ar=$(TARGET_AR)
stat $(PKG_BUILD_DIR)/target/$(RUSTC_TARGET_ARCH)/release/ua4f
endef

define Package/ua4f/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/target/$(RUSTC_TARGET_ARCH)/release/ua4f $(1)/usr/bin/ua4f

$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/etc/config/ua4f $(1)/etc/config/ua4f

$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/etc/init.d/ua4f $(1)/etc/init.d/ua4f

$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/usr/lib/lua/luci/controller/ua4f.lua $(1)/usr/lib/lua/luci/controller/ua4f.lua
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/usr/lib/lua/luci/model/cbi/ua4f.lua $(1)/usr/lib/lua/luci/model/cbi/ua4f.lua
endef

$(eval $(call BuildPackage,ua4f))
Loading

0 comments on commit 3558bdd

Please sign in to comment.