Add the kernel-headers package
This commit is contained in:
parent
f9976b7053
commit
31bd2ad104
|
@ -0,0 +1,41 @@
|
|||
# Toolchain builder for the Serene programming language
|
||||
#
|
||||
# Copyright (c) 2019-2023 Sameer Rahmani <lxsameer@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import os
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
|
||||
|
||||
from conan.tools.files import get
|
||||
|
||||
from conf.utils import with_static_flags, current_dir, get_version
|
||||
|
||||
|
||||
class KernelHeaders(ConanFile):
|
||||
name = "kernel-headers"
|
||||
settings = "os", "arch"
|
||||
version = get_version("kernel")
|
||||
|
||||
def source(self):
|
||||
get(
|
||||
self,
|
||||
f"https://github.com/torvalds/linux/archive/v{self.version}.tar.gz",
|
||||
)
|
||||
|
||||
def build(self):
|
||||
with current_dir(f"linux-{self.version}"):
|
||||
self.run(f"make headers_install INSTALL_HDR_PATH={self.package_folder}")
|
Loading…
Reference in New Issue