Commit 3e9503bc authored by A. Wilcox's avatar A. Wilcox Committed by Natanael Copa

Add initial manpage drafts

parent 7fc859d6
This diff is collapsed.
......@@ -6,11 +6,14 @@ prefix ?= /usr
bindir ?= $(prefix)/bin
sysconfdir ?= /etc
datadir ?= $(prefix)/share/$(PACKAGE)
mandir ?= $(prefix)/share/man
SCRIPTS := abuild abuild-keygen abuild-sign newapkbuild \
abump apkgrel buildlab apkbuild-cpan checkapk \
apkbuild-gem-resolver
USR_BIN_FILES := $(SCRIPTS) abuild-tar abuild-gzsplit abuild-sudo abuild-fetch abuild-rmtemp
MAN_1_PAGES := newapkbuild.1
MAN_5_PAGES := APKBUILD.5
SAMPLES := sample.APKBUILD sample.initd sample.confd \
sample.pre-install sample.post-install
AUTOTOOLS_TOOLCHAIN_FILES := config.sub config.guess
......@@ -91,7 +94,8 @@ help:
install: $(USR_BIN_FILES) $(SAMPLES) abuild.conf functions.sh
install -d $(DESTDIR)/$(bindir) $(DESTDIR)/$(sysconfdir) \
$(DESTDIR)/$(datadir)
$(DESTDIR)/$(datadir) $(DESTDIR)/$(mandir)/man1 \
$(DESTDIR)/$(mandir)/man5
for i in $(USR_BIN_FILES); do\
install -m 755 $$i $(DESTDIR)/$(bindir)/$$i;\
done
......@@ -99,6 +103,12 @@ install: $(USR_BIN_FILES) $(SAMPLES) abuild.conf functions.sh
for i in adduser addgroup apk; do \
ln -fs abuild-sudo $(DESTDIR)/$(bindir)/abuild-$$i; \
done
for i in $(MAN_1_PAGES); do\
install -m 644 $$i $(DESTDIR)/$(mandir)/man1/$$i;\
done
for i in $(MAN_5_PAGES); do\
install -m 644 $$i $(DESTDIR)/$(mandir)/man5/$$i;\
done
if [ -n "$(DESTDIR)" ] || [ ! -f "/$(sysconfdir)"/abuild.conf ]; then\
cp abuild.conf $(DESTDIR)/$(sysconfdir)/; \
fi
......
.Dd November 4, 2017
.Dt NEWAPKBUILD 1 PRM
.Os "Alpine Linux"
.Sh NAME
.Nm newapkbuild
.Nd generate a new APKBUILD
.Sh SYNOPSIS
.Nm
.Op Fl n Ar NAME
.Op Fl d Ar DESC
.Op Fl l Ar LICENSE
.Op Fl u Ar URL
.Op Fl aCmpy
.Op Fl cfhs
.Op Ar pkgname Op Ar -pkgver
.Nm
.Op Fl n Ar NAME
.Op Fl d Ar DESC
.Op Fl l Ar LICENSE
.Op Fl u Ar URL
.Op Fl aCmpy
.Op Fl cfhs
.Op Ar source_url
.Sh DESCRIPTION
.Nm
generates a new APKBUILD for use with
.Xr abuild 1 .
.Bl -tag -width "pkgname-pkgver" -offset indent -compact
.It Fl n Ar NAME
Specifies the name of the new package. A new directory called
.Ar NAME
will be created in the current directory, with the APKBUILD file.
.It Fl d Ar DESC
Specifies the description (pkgdesc=) for the new package.
.It Fl l Ar LICENSE
Specifies the license under which the new package is distributed. This should
match an SPDX Identifier.
.It Fl u Ar URL
Specifies the Web page (url=) for the new package. This should
.Em not
be the source package URL; it should be the project's main Web page.
.It Fl c
Causes
.Nm
to additionally copy an init.d script, conf.d file, and sample pre- and post-
install scripts to the APKBUILD directory. This allows you to have a quick
start for daemon packages.
.It Fl f
Forces
.Nm
to overwrite an existing APKBUILD, if one already exists in the package
directory.
.It Fl h
Displays usage information.
.It Fl s
Create an automatic SourceForge URL for the package based on its name and
version. This is only valid if
.Ar pkgname-pkgver
is specified on the command line.
.It Ar pkgname-pkgver
Specify the package name, if not already specified by
.Fl n .
If followed by a dash (-) and a valid version string, additionally specify the
package's version.
.El
.Ss Build system type
.Nm
will try to automatically detect the build system by inspecting the source
directory if
.Ar source_url
is specified, and write out typical build instructions for that build system.
If you do not specify the source URL, or you want to override auto-detection,
you may specify one of the following four flags:
.Bl -tag -width "-a" -offset indent -compact
.It Fl a
Specifies that the package uses autotools. The APKBUILD will contain a typical
invocation of ./configure, make, and make install.
.It Fl C
Specifies that the package uses CMake. CMake will be added to the makedepends
and a typical CMake invocation will be added to the APKBUILD.
.It Fl m
Specifies that the package uses Meson. A typical Meson and Ninja invocation
will be added to the APKBUILD.
.It Fl p
Specifies that the package uses a Perl Makefile.PL file. The CPAN template
will be used.
.It Fl y
Specifies that the package uses a Python setup.py build system. Python will be
added to the makedepends.
.El
If you do not specify any option, and you do not specify the source URL, the
generated APKBUILD file will not contain any build instructions.
.Sh FILES
All files generated will be placed in a
.Pa pkgname
directory inside the current working directory, with
.Pa pkgname
being created if it does not exist.
.Bl -tag -width "pkgname.post-install" -compact
.It Pa APKBUILD
.Nm
will create
.Pa APKBUILD
with the details gathered from the invocation of
.Nm ,
and introspection of the downloaded package source if
.Ar source_url
is provided.
For more information about APKBUILD and its format, see
.Xr APKBUILD 5 .
.It Pa pkgname.initd
If
.Fl c
is given,
.Nm
will create
.Pa pkgname.initd
with example data to assist in the creation of an init.d script for a daemon.
.It Pa pkgname.confd
If
.Fl c
is given,
.Nm
will create
.Pa pkgname.confd
to assist in the creation of a conf.d file for a daemon, used by init.d
scripts. conf.d files are used to configure init.d scripts; for more
information, see
.Xr openrc 8
and
.Xr rc_config 3 .
.It Pa pkgname.pre-install
If
.Fl c
is given,
.Nm
will create
.Pa pkgname.pre-install ,
the contents of which will be run by
.Xr apk 8
before the package is installed.
.It Pa pkgname.post-install
If
.Fl c
is given,
.Nm
will create
.Pa pkgname.post-install ,
the contents of which will be run by
.Xr apk 8
after the package is successfully installed.
For more information about apk install hooks, consult the
.Xr apk 8
manual.
.El
.Sh EXAMPLES
newapkbuild -n sharutils -d "Utilities for manipulating shell archives" \\
-l "GPL-3.0+" -u "https://www.gnu.org/software/sharutils/" -a \\
https://ftp.gnu.org/gnu/sharutils/sharutils-4.15.2.tar.xz
.Sh SEE ALSO
SPDX license reference (on the Web at <https://spdx.org/licenses/>),
.Xr abuild 1 ,
.Xr apk 8 ,
.Xr APKBUILD 5 .
.Sh AUTHORS
.Nm :
.An Natanael Copa Aq ncopa@alpinelinux.org
Documentation:
.An A. Wilcox Aq awilfox@adelielinux.org
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment