> Do we have any way of checking "is it in subpkgs and not defined"? I thought it was assumed to be runnable.
template variables are passed to the hooks so
```
if [ -z "${subpackages##* ${pkgname}-devel *}" ]; then
return
fi
if typeset -F|grep "${pkgname}-devel_package()" ; then
return
fi
```
> We could use the srcpkgs symlink to check instead.
You can't since the *-devel_package might be wrapped in an conditional or guarded by a build_option.
In general a default _package() will be tricky to do since the declaration of the _package() function is used to determine that the subpackage exists at all.
> It'd be nice, but we can replace that with tooling.
i wrote [xgenpkg](https://github.com/maxice8/xtools-devel/blob/master/xgenpkg) `$ xgenpkg --name mainpkg --pkg mainpkg-devel` to deal with automatically generating package definitions but they don't deal with files that are available in one arch and not in another ( read gnome nocross gobject shit ), while hooks would just deal with the files given directly.