Skip to content

Commit db0c4be

Browse files
committed
packaging: add OpenWrt recipe (E1); refresh Alpine build notes
OpenWrt: a package Makefile (packaging/openwrt/) that stages the same self-contained tree the deb/rpm ship via install.sh, with the perlbase-*/ perl-curses DEPENDS and the perl-curses porting caveat called out (E1). Plus a README on building it inside an OpenWrt SDK. Not built here (no OpenWrt SDK). Alpine: the APKBUILD is already at 2.4; document the git-archive + abuild checksum + abuild -r build flow. Not built here (no abuild). Both recipes are kept in step with the .deb/.rpm so they are ready to build on their own toolchains. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent fbb48ac commit db0c4be

3 files changed

Lines changed: 129 additions & 2 deletions

File tree

packaging/alpine/APKBUILD

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
# tree under /usr/lib/ccfe staged by the upstream installer, with a PATH
66
# symlink. Paths resolve at runtime, so nothing is templated.
77
#
8-
# Build (needs alpine-sdk / abuild): abuild -r
8+
# Build on an Alpine host with alpine-sdk / abuild:
9+
# git archive --format=tar.gz --prefix=ccfe-2.4/ -o ccfe-2.4.tar.gz HEAD
10+
# abuild checksum # fills sha512sums for the local tarball
11+
# abuild -r # builds the .apk under ~/packages/
912
#
10-
# NOTE: not built/tested in this environment (no abuild available here).
13+
# NOTE: the .apk is not built here (no abuild in this environment); the recipe
14+
# is kept in step with the .deb/.rpm so it is ready to build on Alpine.
1115
pkgname=ccfe
1216
pkgver=2.4
1317
pkgrel=0

packaging/openwrt/Makefile

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#
2+
# OpenWrt package for CCFE (FEATURE-REQUESTS E1).
3+
#
4+
# Drop this directory into an OpenWrt buildroot / SDK as a package (e.g.
5+
# package/utils/ccfe, or via a custom feed), then:
6+
# make package/ccfe/compile V=s
7+
#
8+
# CCFE is a Perl program plus declarative data files -- nothing is compiled.
9+
# The bundled installer stages the same self-contained tree the .deb/.rpm ship
10+
# (under /usr/lib/ccfe, with a /usr/bin/ccfe symlink) and CCFE resolves its
11+
# paths at runtime from the binary location, so nothing is templated into code.
12+
#
13+
# Caveats (see FEATURE-REQUESTS.md, item E1):
14+
# * perl-curses -- CCFE needs the Curses XS binding. Confirm `perl-curses` is
15+
# available in your feeds (the `packages` feed) or build it; without it ccfe
16+
# will not start. This is the main porting risk.
17+
# * The perlbase-* list below covers the core modules CCFE uses; the exact
18+
# split-package names vary slightly between OpenWrt releases -- adjust if a
19+
# build reports a missing perlbase-*.
20+
# * Man pages are staged under /usr/lib/ccfe/man; trim them in Package/install
21+
# if image size matters on the target.
22+
#
23+
# Copyright (C) 2026 CCFE contributors. GPL-2.0-or-later.
24+
25+
include $(TOPDIR)/rules.mk
26+
27+
PKG_NAME:=ccfe
28+
PKG_VERSION:=2.4
29+
PKG_RELEASE:=1
30+
31+
# Fetch the tagged release from git. Point this at wherever the release is
32+
# tagged and set a real PKG_MIRROR_HASH for production (replace `skip`).
33+
PKG_SOURCE_PROTO:=git
34+
PKG_SOURCE_URL:=https://github.com/OpusVL/perl-ccfe.git
35+
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
36+
PKG_MIRROR_HASH:=skip
37+
38+
PKG_MAINTAINER:=CCFE maintainers <ccfedevel@gmail.com>
39+
PKG_LICENSE:=GPL-2.0-or-later
40+
PKG_LICENSE_FILES:=src/COPYING
41+
42+
include $(INCLUDE_DIR)/package.mk
43+
44+
define Package/ccfe
45+
SECTION:=utils
46+
CATEGORY:=Utilities
47+
TITLE:=Curses Command Front-end
48+
URL:=https://github.com/OpusVL/perl-ccfe
49+
DEPENDS:=+perl +perl-curses \
50+
+perlbase-posix +perlbase-getopt +perlbase-ipc +perlbase-io \
51+
+perlbase-file +perlbase-findbin +perlbase-cwd +perlbase-text \
52+
+perlbase-digest +perlbase-term +perlbase-sys +perlbase-essential
53+
endef
54+
55+
define Package/ccfe/description
56+
CCFE puts an interactive, screen-oriented front-end on command-line scripts
57+
and commands, driven by plain declarative menu and form files. Modelled on
58+
AIX's SMIT, with optional colour, menu/form search, runtime theme and key-map
59+
switching, file-based notifications, and a restricted (kiosk) mode well suited
60+
to an appliance login.
61+
endef
62+
63+
# Pure Perl + data files: nothing to cross-compile, just syntax-check the
64+
# program on the build host.
65+
define Build/Compile
66+
perl -c $(PKG_BUILD_DIR)/src/ccfe.pl
67+
endef
68+
69+
# Stage the self-contained tree with the upstream installer, then add the
70+
# on-PATH symlink (relative, so it follows the relocatable tree).
71+
define Package/ccfe/install
72+
cd $(PKG_BUILD_DIR)/src && sh install.sh -b -p $(1)/usr/lib/ccfe
73+
$(INSTALL_DIR) $(1)/usr/bin
74+
$(LN) ../lib/ccfe/bin/ccfe $(1)/usr/bin/ccfe
75+
endef
76+
77+
$(eval $(call BuildPackage,ccfe))

packaging/openwrt/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# CCFE — OpenWrt package
2+
3+
`Makefile` is an OpenWrt package recipe for CCFE (FEATURE-REQUESTS **E1**).
4+
5+
CCFE is a Perl program plus declarative data files, so the package compiles
6+
nothing — the bundled installer stages the same self-contained tree the `.deb`
7+
and `.rpm` ship (under `/usr/lib/ccfe`, with a `/usr/bin/ccfe` symlink), and
8+
CCFE resolves its paths at runtime from the binary location.
9+
10+
## Building
11+
12+
This must be built inside an **OpenWrt buildroot or SDK** for your target — it
13+
cannot be built from this repo's `Makefile` (that one builds the `.deb`/`.rpm`).
14+
15+
1. Copy this directory into the buildroot as a package, e.g.
16+
`package/utils/ccfe/`, or add it through a custom feed.
17+
2. Make sure the **`packages`** feed is enabled (it provides `perl`,
18+
`perlbase-*` and — the porting risk — **`perl-curses`**):
19+
```sh
20+
./scripts/feeds update -a && ./scripts/feeds install -a
21+
```
22+
3. Select `Utilities → ccfe` in `make menuconfig`, then:
23+
```sh
24+
make package/ccfe/compile V=s
25+
```
26+
The `.ipk` lands under `bin/packages/<arch>/…`.
27+
28+
## Caveats
29+
30+
- **`perl-curses`** is the dependency to verify first: CCFE needs the Curses XS
31+
binding and will not start without it. If your feed lacks it, build/add it.
32+
- The `perlbase-*` dependency list in the `Makefile` covers the core modules
33+
CCFE uses; the exact split-package names drift a little between OpenWrt
34+
releases — adjust if a build reports a missing `perlbase-*`.
35+
- The recipe fetches the tagged release over git with `PKG_MIRROR_HASH:=skip`;
36+
set a real hash (and point `PKG_SOURCE_URL` at wherever the release is tagged)
37+
for a production feed.
38+
- Man pages are staged under `/usr/lib/ccfe/man`; trim them in
39+
`Package/ccfe/install` if image size matters on the target.
40+
41+
## OpenWrt admin menu (future)
42+
43+
The second half of E1 — a curated OpenWrt admin menu/plugin wrapping `uci`,
44+
service control, `opkg`, network/firewall and `logread` (the "remembered
45+
commands" pattern, OpenWrt-flavoured) — is not in this package yet. It pairs
46+
naturally with the kiosk login (`ccfe -R` + `ccfe-login`) for an appliance UI.

0 commit comments

Comments
 (0)