1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= ravensys-uname
5 KEYWORDS= raven sysutils
7 SDESC[standard]= Fake uname for raven-sysroot
9 CONTACT= John_Marino[draco@marino.st]
12 SPKGS[standard]= single
14 OPTIONS_AVAILABLE= none
15 OPTIONS_STANDARD= none
17 LICENSE= BSD2CLAUSE:single
18 LICENSE_FILE= BSD2CLAUSE:{{FILESDIR}}/LICENSE
23 ${SED} -e 's|@OPSYS@|${OPSYS}|g' \
24 -e 's|@ARCH@|${SET_ARCH}|g' \
25 -e 's|@PLATFORM@|${SET_PLATFORM}|g' \
26 -e 's|@RELEASE@|${SET_RELEASE}-RAVEN|g' \
27 -e 's|@USERVER@|${OSVERSION}|g' \
28 ${FILESDIR}/uname.c.in > ${WRKSRC}/uname.c
31 (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
32 ${CC} -o ravensys-uname uname.c ${CFLAGS})
35 ${INSTALL_PROGRAM} ${WRKSRC}/ravensys-uname ${STAGEDIR}${PREFIX}/bin/
37 [FILE:50:descriptions/desc.single]
38 Fake uname for explicit use with ravenports jail.
41 [FILE:19:manifests/plist.single]
45 [FILE:1862:files/LICENSE]
47 * Copyright (c) 2002 Juli Mallett.
49 * The Regents of the University of California. All rights reserved.
51 * Redistribution and use in source and binary forms, with or without
52 * modification, are permitted provided that the following conditions
54 * 1. Redistributions of source code must retain the above copyright
55 * notice, this list of conditions and the following disclaimer.
56 * 2. Redistributions in binary form must reproduce the above copyright
57 * notice, this list of conditions and the following disclaimer in the
58 * documentation and/or other materials provided with the distribution.
59 * 3. All advertising materials mentioning features or use of this software
60 * must display the following acknowledgement:
61 * This product includes software developed by the University of
62 * California, Berkeley and its contributors.
63 * 4. Neither the name of the University nor the names of its contributors
64 * may be used to endorse or promote products derived from this software
65 * without specific prior written permission.
67 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
68 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
69 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
70 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
71 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
72 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
73 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
74 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
75 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
76 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
81 [FILE:668:files/special.mk]
82 # add ARCH_STANDARD conditions as multiple arches per OPSYS
89 .elif ${OPSYS:MDragonFly}
93 .elif ${OPSYS:MNetBSD}
97 .elif ${OPSYS:MOpenBSD}
100 SET_RELEASE= ${OSREL}
101 .elif ${OPSYS:MDarwin}
104 SET_RELEASE= ${MAJOR}
105 .elif ${OPSYS:MSunOS}
106 SET_ARCH= x86_64 #check
108 SET_RELEASE= ${OSREL}
109 .elif ${OPSYS:MLinux}
112 SET_RELEASE= ${OSREL}
116 [FILE:2145:files/uname.c.in]
124 #define u_int unsigned int
136 static void print_uname(u_int);
137 static void usage(void);
139 static const char *sysname = "@OPSYS@";
140 static const char *arch = "@ARCH@";
141 static const char *platform = "@PLATFORM@";
142 static const char *release = "@RELEASE@";
143 static const char *uservers = "@USERVER@";
144 static const char *ident = "GENERIC";
145 static const char *version = "@OPSYS@ @RELEASE@ #0 Sat Jul 29 09:00:00 CDT 2017 root@octavia.unreal.systems:/usr/obj/usr/src/sys/GENERIC";
146 static const char *hostname = "octavia.unreal.systems";
150 main(int argc, char *argv[])
157 while ((ch = getopt(argc, argv, "aimnoprsUv")) != -1)
160 flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG);
205 #define PRINT_FLAG(flags,flag,var) \
206 if ((flags & flag) == flag) { \
215 print_uname(u_int flags)
217 PRINT_FLAG(flags, SFLAG, sysname);
218 PRINT_FLAG(flags, NFLAG, hostname);
219 PRINT_FLAG(flags, RFLAG, release);
220 PRINT_FLAG(flags, VFLAG, version);
221 PRINT_FLAG(flags, MFLAG, platform);
222 PRINT_FLAG(flags, PFLAG, arch);
223 PRINT_FLAG(flags, IFLAG, ident);
224 PRINT_FLAG(flags, UFLAG, uservers);
231 fprintf(stderr, "usage: uname [-aiKmnoprsUv]\n");