summaryrefslogtreecommitdiff
path: root/pkg/perp
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-12-11 16:04:20 -0800
committerMichael Forney <mforney@mforney.org>2016-12-13 23:10:30 -0800
commit293f5a93b77d92fd65db7f3d0df654f102e46cfb (patch)
tree6ecd1170e3dd793862dd852814dc1b4cd5e44260 /pkg/perp
parent9a506a6834df01a26795cea222b410f206efa9fa (diff)
Move to flat package hierarchy
Note to self: never try to move submodules again To migrate your existing submodules (more or less): set -x set -e mkdir .git/modules/pkg for old in */*/src ; do new="pkg/${old#*/}" if ! [ -f "$old/.git" ] || [ "${old%%/*}" = pkg ] ; then continue fi git -C ".git/modules/$old" config core.worktree "../../../../../$new" rmdir "$new" mv "$old" "$new" sed -e "s,$old,$new," "$new/.git" > "$new/.git.tmp" mv "$new/.git.tmp" "$new/.git" mkdir ".git/modules/${new%/src}" mv ".git/modules/$old" ".git/modules/$new" rm "${old%/src}"/*.ninja mv "${old%/src}"/*.tar.{gz,xz,bz2} "${new%/src}/" rmdir "${old%/src}" || true done sed -e 's,^\[submodule "[^/]*/,[submodule "pkg/,' .git/config > .git/config.tmp mv .git/config.tmp .git/config
Diffstat (limited to 'pkg/perp')
-rw-r--r--pkg/perp/.gitignore3
-rw-r--r--pkg/perp/gen.rc86
-rw-r--r--pkg/perp/rev1
-rw-r--r--pkg/perp/sha2561
-rw-r--r--pkg/perp/url1
5 files changed, 92 insertions, 0 deletions
diff --git a/pkg/perp/.gitignore b/pkg/perp/.gitignore
new file mode 100644
index 00000000..d550babc
--- /dev/null
+++ b/pkg/perp/.gitignore
@@ -0,0 +1,3 @@
+/perp-2.07.tar.gz
+/src
+/tools.ninja
diff --git a/pkg/perp/gen.rc b/pkg/perp/gen.rc
new file mode 100644
index 00000000..870d8432
--- /dev/null
+++ b/pkg/perp/gen.rc
@@ -0,0 +1,86 @@
+cflags\
+ -I '$srcdir'/lasagna\
+ -I '$outdir'
+
+{
+ include 'toolchain/$host_toolchain.ninja'
+ exe mk_outvec lasagna/outvec/mk_outvec.c
+ exe mk_rlimit lasagna/rlimit/mk_rlimit.c
+ exe mksysstr lasagna/sysstr/mksysstr.c
+} >tools.ninja ; subninja tools.ninja
+
+rule outvec '$outdir/mk_outvec >$out.tmp && mv $out.tmp $out'
+build '$outdir'/outvec_STDOUT.h outvec '|' '$outdir'/mk_outvec
+
+rule rlimit '$outdir/mk_rlimit >$out.tmp && mv $out.tmp $out'
+build '$outdir'/rlimit_defs.c.in rlimit '|' '$outdir'/mk_rlimit
+
+rule sysstr '$outdir/mksysstr $type >$out.tmp && mv $out.tmp $out'
+build '$outdir'/sysstr_errno.c.in sysstr '|' '$outdir'/mksysstr ; with type errno
+build '$outdir'/sysstr_signo.c.in sysstr '|' '$outdir'/mksysstr ; with type signo
+
+phony deps '$outdir'/^(outvec_STDOUT.h rlimit_defs.c.in sysstr_^(errno signo)^.c.in)
+
+lib libasagna.a -d '$dir'/deps lasagna/^(\
+ buf/buf_^(cmp copy fill ndx rcopy rndx)^.c\
+ cstr/cstr_^(cat chop cmp cmpi contains copy dup lcat lcpy len ltrim match matchi ncmp pos rpos rtrim trim vcat_ vcopy_ vlen_)^.c\
+ cdb/^(cdb_^(find cc clear close distance dynget dynread get hashpart init open read seq) cdbmk_^(add addioq addrec clear finish init _update))^.c\
+ devout/devout.c\
+ domsock/domsock_^(accept close connect create)^.c\
+ dynbuf/^(dynbuf.c dynbuf_^(clear copy free freebuf grow need new pack put putb)^.c)\
+ dynstr/^(dynstr.c dynstr_^(chop clear copy copys free freestr grow need new put putc putn puts set vputs_)^.c)\
+ dynstuf/dynstuf_^(find free get grow init isempty items new peek pop push replace reverse set slots sort stuf visit)^.c\
+ execvx/execvx.c\
+ fd/fd_^(blocking cloexec dupe move nonblock)^.c\
+ hdb/hdb_^(find cc clear close distance dynget dynread get hashpart init open read seq)^.c\
+ hdb/hdbmk_^(add addioq addrec clear finish start _update)^.c\
+ hfunc/hfunc_^(djba djbm djbx elf1 fnva fnvm ghfa ghfm ghfx jsw1 kp37 kr31 kx17 murm oat1 p50a pjw1 rsuh rot1 rotm sax1 sdbm sfh1 postmix32)^.c\
+ ioq/ioq_^(get getln init put putfd putfile stderr stdin stdout vputs_)^.c\
+ newenv/newenv.c\
+ nextopt/^(nextopt nextopt_progname)^.c\
+ nfmt/nfmt_^(uint32 uint32_pad uint32_pad_ uint32_pad0 uint32_pad0_ uint32o uint32o_pad0 uint32o_pad0_ uint32x uint32x_pad uint32x_pad_ uint32x_pad0 uint32x_pad0_ uint64 uint64_pad uint64_pad_ uint64_pad0 uint64_pad0_)^.c\
+ nuscan/nuscan_^(uint32 uint32o)^.c\
+ outvec/outvec_^(STDERR STDOUT flush put puts vputs_)^.c\
+ packet/packet_^(read write)^.c\
+ padlock/padlock_^(exbyte exlock extest fcntl shbyte shlock shtest unbyte unlock)^.c\
+ pidlock/pidlock_^(check set)^.c\
+ pkt/pkt_^(load read write)^.c\
+ pollio/pollio.c\
+ rlimit/rlimit.c\
+ sig/sig_^(block catch catchr unblock)^.c\
+ sysstr/sysstr_^(errno signal)^.c\
+ tain/tain_^(assign iszero less load load_msecs load_utc minus now pack packhex pause plus tai_pack tai_unpack uptime to_float to_msecs to_utc unpack unpackhex)^.c\
+ tx64/^(base64_vec tx64_encode)^.c\
+ ufunc/ufunc_^(u32add u48add)^.c\
+ upak/upak_vpack.c\
+ upak/upak^('' 16 24 32 48 64)^_pack.c\
+ upak/upak^('' 16 24 32 48 64)^_unpack.c\
+)
+
+fn x {
+ subdir=$1
+ exe=$2
+ shift 2
+ exe $exe $subdir/$* libasagna.a
+ if(! ~ $exe cat*)
+ file share/man/man8/$exe.8 '$srcdir'/$subdir/man/$exe.8 644
+ file bin/$exe '$outdir'/$exe 755
+}
+
+x perp perpd perpd.c perpd_conn.c perpd_svdef.c
+
+cc perp/tinylog.c ; with\
+ cflags '$cflags -D ''TINYLOG_ZIP="/bin/gzip"'' -D ''ZIP_EXT=".gz"'''
+x perp tinylog tinylog.c.o
+
+for(exe in perp^(boot ctl hup ls ok stat)) x perp $exe $exe.c
+tools=(\
+ run^(args argv0 choom detach deux env file limit lock pause session tool trap uid)\
+ cat^(args env limits uid)\
+) for(exe in $tools) x runtools $exe $exe.c
+
+file share/man/man5/perpetrate.5 '$srcdir'/perp/man/perpetrate.5 644
+file share/man/man8/perp_intro.8 '$srcdir'/perp/man/perp_intro.8 644
+file share/man/man5/runtools_intro.8 '$srcdir'/runtools/man/runtools_intro.8 644
+
+fetch curl
diff --git a/pkg/perp/rev b/pkg/perp/rev
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/pkg/perp/rev
@@ -0,0 +1 @@
+1
diff --git a/pkg/perp/sha256 b/pkg/perp/sha256
new file mode 100644
index 00000000..943750d5
--- /dev/null
+++ b/pkg/perp/sha256
@@ -0,0 +1 @@
+1222fe31c16014d8b2a78416f93ba9f8c31eddbc381adc9021fa5d9764475815 perp-2.07.tar.gz
diff --git a/pkg/perp/url b/pkg/perp/url
new file mode 100644
index 00000000..0eff1363
--- /dev/null
+++ b/pkg/perp/url
@@ -0,0 +1 @@
+url = "http://b0llix.net/perp/distfiles/perp-2.07.tar.gz"