Suggest a sample package as a template for a new no-compile package

I'm working on a new package to take a github project and install some of its files. No need to actually compile anything--just unpack the sources and install some files from it as executable scripts.
Can you suggest an existing package that would be similar and I could use as an example?

Try to provide less info.

Maybe one of the luci-packages? Some of them don't do anything other than drop a few static files on the filesystem.

If your intent is to package this into a personal feed you want to incorporate into your <buildroot>, or propose to the the community, you could take a look at the Makefile and structure of Adblock in the openwrt/packages/net github repository as a guide. Nothing to compile.

Alternatively you could just copy the scripts to their respective <buildroot>/files directory.

Thanks, Adblock was pretty close. I also looked at odhcpd (which I'm doing some other tweaks on) for the git repo download parts.

I got myself confused that I'd missed something when make package/xxx/install (mentioned in https://openwrt.org/docs/guide-developer/toolchain/single.package) yielded a failure. make package/xxx/compile actually does all the work and generates the .ipk file I was looking for.

Then since there's no configure or build steps needed in my case, I ended up with this skeleton:

include $(TOPDIR)/rules.mk

PKG_NAME:=xxx
PKG_VERSION:=1
PKG_RELEASE:=1

PKG_MAINTAINER:=xxx
PKG_LICENSE:=xxx
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/xxx 
PKG_MIRROR_HASH:=xxx
PKG_SOURCE_DATE:=2022-06-12
PKG_SOURCE_VERSION:=xxx

include $(INCLUDE_DIR)/package.mk

define Package/xxx
  SECTION:=xxx
  etc.
endef

define Package/xxx/description
  xxx is awesome, etc.
endef

define Build/Compile
endef

define Build/Configure
endef

define Build/Install
endef

define Package/xxx/install
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/etc/init.d/xxx $(1)/etc/init.d/xxx
endef

$(eval $(call BuildPackage,xxx))
2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.