create core package

This commit is contained in:
aydemir
2015-02-24 11:18:35 +02:00
parent 0e4b743b82
commit 70b25d0f95
1098 changed files with 169545 additions and 0 deletions
+119
View File
@@ -0,0 +1,119 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import kerneltools
from pisi.actionsapi import get
import os
WorkDir = "klibc-%s" % get.srcVERSION()
NoStrip = "/"
KDIR = kerneltools.getKernelVersion()
klibcarch = "x86_64" if get.ARCH() == "x86_64" else "i386"
docs = {"usr/klibc/arch/README.klibc.arch": "README.arch",
"usr/dash/README.dash": "README.dash",
"usr/dash/TOUR": "TOUR.dash",
"usr/gzip/README": "README.gzip",
"usr/gzip/COPYING": "COPYING.gzip",
"usr/kinit/README": "README.kinit"}
configh = """
#ifndef _LINUX_CONFIG_H
#define _LINUX_CONFIG_H
#include <linux/autoconf.h>
#endif
"""
#~ shelltools.export("C_INCLUDE_PATH", "/usr/include")
def fixperms(d):
for root, dirs, files in os.walk(d):
for name in dirs:
shelltools.chmod(os.path.join(root, name), 0755)
for name in files:
shelltools.chmod(os.path.join(root, name), 0644)
def setup():
# we must include headers, but kernel headers chango too fast, maybe we should
# go back to adding them as a patch
# shelltools.sym("/lib/modules/%s/build" % KDIR, "linux")
#~ shelltools.copytree("/lib/modules/%s/build" % KDIR, "linux")
shelltools.makedirs("linux/include")
shelltools.system("ln -s /usr/include/linux linux/include/")
shelltools.system("ln -s /usr/include/asm linux/include/")
shelltools.system("ln -s /usr/include/asm-generic linux/include/")
# don't install kernel headers
pisitools.dosed("scripts/Kbuild.install", ".*headers_install")
# set the build directory
#~ shelltools.echo("MCONFIG", "KRNLOBJ = /lib/modules/%s/build" % KDIR)
#shelltools.sym("../linux-3.7","linux")
# Workaround for prelink warnings
shelltools.echo("70klibc", 'PRELINK_PATH_MASK="/usr/lib/klibc"')
pisitools.dosed("Makefile", "/man", "/share/man")
# shelltools.echo("linux/include/linux/config.h", configh)
def build():
shelltools.export("ARCH", "")
autotools.make('EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
HOSTCC="%s" CC="%s" \
KLIBCARCH=%s \
KLIBCASMARCH=x86 \
libdir=/usr/lib \
SHLIBDIR=/lib \
mandir=/usr/share/man \
INSTALLDIR=/usr/lib/klibc' % (get.CC(), get.CC(), klibcarch))
def install():
shelltools.export("ARCH", "")
autotools.rawInstall('EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
HOSTCC="%s" CC="%s" \
KLIBCARCH=%s \
KLIBCASMARCH=x86 \
libdir=/usr/lib \
SHLIBDIR=/lib \
mandir=/usr/share/man \
INSTALLROOT="%s" \
INSTALLDIR=/usr/lib/klibc' % (get.CC(), get.CC(), klibcarch, get.installDIR()))
asmSrcDir = "linux/arch/x86/include/asm"
asmTargetDir = "/usr/lib/klibc/include/asm"
# FIXME: we probably don't need old kernel workarounds anymore
# just a workaround for installer bug with 2.6.24, will make it sane later
#pisitools.remove(asmTargetDir)
#pisitools.dosym("asm-x86", asmTargetDir)
# yet another new kernel compatibility workaround for 2.6.28 and above
#for f in shelltools.ls(asmSrcDir):
# pisitools.insinto(asmTargetDir, "%s/%s" % (asmSrcDir, f))
fixperms("%s/usr/lib/klibc/include" % get.installDIR())
for f in ["gunzip", "zcat"]:
pisitools.remove("/usr/lib/klibc/bin/%s" % f)
pisitools.dosym("gzip", "/usr/lib/klibc/bin/%s" % f)
pisitools.dodoc("README", "usr/klibc/LICENSE", "usr/klibc/CAVEATS")
for f in docs:
pisitools.newdoc(f, docs[f])
pisitools.insinto("/usr/lib/klibc/include/linux", "linux/include/linux/*")
pisitools.insinto("/usr/lib/klibc/include/asm", "linux/include/asm/*")
pisitools.insinto("/usr/lib/klibc/include/asm-generic", "linux/include/asm-generic/*")
+93
View File
@@ -0,0 +1,93 @@
# klibc.m4 serial 99
## Copyright (C) 1995-2003 Free Software Foundation, Inc.
## This file is free software, distributed under the terms of the GNU
## General Public License. As a special exception to the GNU General
## Public License, this file may be distributed as part of a program
## that contains a configuration script generated by Autoconf, under
## the same distribution terms as the rest of that program.
##
## This file can can be used in projects which are not available under
## the GNU General Public License or the GNU Library General Public
## License but which still want to provide support for the GNU gettext
## functionality.
## Please note that the actual code of the KLIBC Library is partly covered
## by the GNU Library General Public License, and party copyrighted by the
## Regents of The University of California, and the rest is covered by a
## MIT style license.
# Authors:
# Martin Schlemmer <azarah@nosferatu.za.org>, 2005.
# AC_CHECK_KLIBC
# --------------
# Check if the user wants KLIBC support enabled. If so, set KLIBC=yes and
# fill in KLIBC_PREFIX, KLIBC_BINDIR, KLIBC_SBINDIR, KLIBC_LIBDIR and
# KLIBC_INCLUDEDIR. CC is also set to the proper klcc executable.
# NOTE: This should be called before AC_PROG_CC, and before header, function
# or type checks.
AC_DEFUN([AC_CHECK_KLIBC],
[AC_BEFORE([$0], [AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_ENABLE([klibc],
[AS_HELP_STRING([--enable-klibc],
[Enable linking to klibc [no]. You need at
least klibc-1.0 or later for this. Set KLCC
to the absolute file name of klcc if not in
the PATH])],
[KLIBC=$enableval], [KLIBC=no])
AC_ARG_ENABLE([klibc-layout],
[AS_HELP_STRING([--enable-klibc-layout],
[Enable installing binaries, libraries and
headers into the klibc prefix [yes] ])],
[if test "X$KLIBC" != Xno; then
KLIBC_LAYOUT=$enableval
else
KLIBC_LAYOUT=no
fi],
[if test "X$KLIBC" != Xno; then
KLIBC_LAYOUT=yes
else
KLIBC_LAYOUT=no
fi])
if test "X$KLIBC" != Xno; then
# Basic cross compiling support. I do not think it is wise to use
# AC_CHECK_TOOL, because if we are cross compiling, we do not want
# just 'klcc' to be returned ...
if test "${host_alias}" != "${build_alias}"; then
AC_CHECK_PROGS([KLCC], [${host_alias}-klcc], [no])
else
AC_CHECK_PROGS([KLCC], [klcc], [no])
fi
if test "X$KLCC" = Xno; then
AC_MSG_ERROR([cannot find klibc frontend 'klcc'!])
fi
CC="$KLCC"
CFLAGS="-Os"
KLIBC_KCROSS="$($KLCC -print-klibc-kcross 2>/dev/null)"
KLIBC_PREFIX="$($KLCC -print-klibc-prefix 2>/dev/null)"
KLIBC_BIN_DIR="$($KLCC -print-klibc-bindir 2>/dev/null)"
KLIBC_SBIN_DIR="${KLIBC_PREFIX}/${KLIBC_KCROSS}sbin"
KLIBC_LIB_DIR="$($KLCC -print-klibc-libdir 2>/dev/null)"
KLIBC_INCLUDE_DIR="$($KLCC -print-klibc-includedir 2>/dev/null)"
if test "X$KLIBC_LAYOUT" != Xno; then
prefix="$KLIBC_PREFIX"
bindir="$KLIBC_BIN_DIR"
sbindir="$KLIBC_SBIN_DIR"
libdir="$KLIBC_LIB_DIR"
includedir="$KLIBC_INCLUDE_DIR"
fi
# At least KLIBC_LIB_DIR should be valid, else klibc is too old or
# something went wrong
if test ! -d "$KLIBC_LIB_DIR"; then
AC_MSG_ERROR([your klibc installation is too old or not functional!])
fi
fi
AC_SUBST(KLIBC)
])# AC_CHECK_KLIBC
+71
View File
@@ -0,0 +1,71 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>klibc</Name>
<Homepage>http://www.zytor.com/mailman/listinfo/klibc</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>LGPLv2.1</License>
<License>GPLv2</License>
<IsA>library</IsA>
<Summary>A minimal libc subset for use with initramfs</Summary>
<Description>klibc, or "early userspace", is library part of an effort which tries to move as much initialization code in Linux as possible out of the kernel.</Description>
<Archive sha1sum="d5b4f85c8d7684772667accf3a218eea95d3c1c2" type="tarxz">https://www.kernel.org/pub/linux/libs/klibc/2.0/klibc-2.0.3.tar.xz</Archive>
<!--Archive sha1sum="18a30cecd740f118013839333d9774e79b6a7510" type="tarxz">http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.7.tar.xz</Archive-->
<BuildDependencies>
<Dependency>perl</Dependency>
<Dependency>kernel-module-headers</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>klibc</Name>
<Files>
<Path fileType="library">/lib</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="executable">/usr/lib/klibc/bin</Path>
<Path fileType="header">/usr/lib/klibc/include</Path>
<Path fileType="library">/usr/lib/klibc/lib</Path>
<Path fileType="data">/usr/share/aclocal</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="man">/usr/share/man/</Path>
</Files>
<AdditionalFiles>
<AdditionalFile target="/usr/share/aclocal/klibc.m4" permission="0644" owner="root">klibc.m4</AdditionalFile>
</AdditionalFiles>
</Package>
<History>
<Update release="4">
<Date>2014-05-11</Date>
<Version>2.0.3</Version>
<Comment>Release bump.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-03-28</Date>
<Version>2.0.3</Version>
<Comment>Version bump</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-10-22</Date>
<Version>2.0.2</Version>
<Comment>Rebuild, cleanup.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2013-01-04</Date>
<Version>2.0.2</Version>
<Comment>First release</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
</History>
</PISI>
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>klibc</Name>
<Summary xml:lang="tr">Küçük bir C kütüphanesi (libc) uyarlaması</Summary>
<Description xml:lang="tr">klibc, sistem başlangıcı için gerekli olan kodların mümkün olduğunca çok kısmını Linux çekirdeği dışına atma hedefiyle oluşturulmuş bir kütüphanedir.</Description>
<Description xml:lang="fr">klibc ou &quot;espace utilisateur tôt&quot;, est une librairie résultante de l'effort pour transférer autant de code d'initialisation de Linux que possible hors du noyau.</Description>
</Source>
</PISI>