LFS-RPM/SPECS/linux.spec

66 lines
2.4 KiB
Plaintext
Raw Permalink Normal View History

2020-06-01 16:11:06 -04:00
#TARBALL: https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.5.3.tar.xz
#MD5SUM: 3ea50025d8c679a327cf2fc225d81a46;SOURCES/linux-5.5.3.tar.xz
2019-05-24 08:27:40 -04:00
#-----------------------------------------------------------------------------
Summary: The Linux package contains the Linux kernel.
Name: linux
2020-06-01 16:11:06 -04:00
Version: 5.5.3
Release: 1
2019-05-24 08:27:40 -04:00
License: GPLv2
URL: https://www.kernel.org
Group: LFS/Base
2020-06-01 16:11:06 -04:00
Source0: https://www.kernel.org/pub/linux/kernel/v5.x/%{name}-%{version}.tar.xz
2019-05-24 08:27:40 -04:00
Source1: config-%{VERSION}
Requires: filesystem
Requires: mkinitramfs
%description
The Linux package contains the Linux kernel.
#-----------------------------------------------------------------------------
%prep
%setup -q -n %{NAME}-%{VERSION}
%build
make mrproper
# make defconfig
# make allmodconfig
2020-06-01 16:11:06 -04:00
cp %{SOURCE1} .config
2019-05-24 08:27:40 -04:00
# make oldconfig
make olddefconfig
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} INSTALL_MOD_PATH=%{buildroot} modules_install
install -vdm 755 %{buildroot}/boot
cp -v arch/x86/boot/bzImage %{buildroot}/boot/vmlinuz-%{version}
cp -v System.map %{buildroot}/boot/System.map-%{version}
cp -v .config %{buildroot}/boot/config-%{version}
install -d %{buildroot}%{_docdir}/%{NAME}-%{VERSION}
cp -r Documentation/* %{buildroot}%{_docdir}/%{NAME}-%{version}
#-----------------------------------------------------------------------------
# Copy license/copying file
install -D -m644 COPYING %{buildroot}/usr/share/licenses/%{name}-%{VERSION}/LICENSE
#-----------------------------------------------------------------------------
# Create file list
find %{buildroot} -name '*.la' -delete
2020-06-01 16:11:06 -04:00
find "${RPM_BUILD_ROOT}" -not -type d -print > filelist.list
sed -i "s|^${RPM_BUILD_ROOT}||" filelist.list
sed -i '/man\/man/d' filelist.list
sed -i '/\/usr\/share\/info/d' filelist.list
2019-05-24 08:27:40 -04:00
#-----------------------------------------------------------------------------
2020-06-01 16:11:06 -04:00
%files -f filelist.list
2019-05-24 08:27:40 -04:00
%defattr(-,root,root)
#-----------------------------------------------------------------------------
%post
pushd /boot
touch initrd.img-%{VERSION}
rm initrd.img-%{VERSION}
mkinitramfs %{VERSION}
popd
%postun
pushd /boot
touch initrd.img-%{VERSION}
rm initrd.img-%{VERSION}
popd
#-----------------------------------------------------------------------------
%changelog
2020-06-01 16:11:06 -04:00
* Mon Jun 01 2020 Chris Cromer <chris@cromer.cl> 5.5.3-1
2019-05-24 08:27:40 -04:00
* Tue Jan 09 2018 baho-utot <baho-utot@columbus.rr.com> 4.15.3-1
- Initial build. First version