summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorJacek Pielaszkiewicz <j.pielaszkie@samsung.com>2014-01-27 15:19:59 +0100
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:46:55 +0900
commitb66d3603ad9e474943102f6888e0fc6c3fbcf9fc (patch)
treebf28c07e5c6da7b10394b585b8c29420ba71c2b2 /packaging
parentc5c6278658059fa4c0b96815a73fd7f755fed02d (diff)
downloadlinux-3.10-b66d3603ad9e474943102f6888e0fc6c3fbcf9fc.tar.gz
linux-3.10-b66d3603ad9e474943102f6888e0fc6c3fbcf9fc.tar.bz2
linux-3.10-b66d3603ad9e474943102f6888e0fc6c3fbcf9fc.zip
spec: add missing build dependences and output packages cleanup.
The following changes have been implemeneted: 1. Add BuildRequires on module-init-tools 2. Cleanup Documentation directory from *.txt files 3. Update file permisions for executable files (*.sh, *pl) Change-Id: I06a9348f6220ce2383b6f788635acbd0fe5ef78e Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/linux-kernel.spec32
1 files changed, 23 insertions, 9 deletions
diff --git a/packaging/linux-kernel.spec b/packaging/linux-kernel.spec
index ce062c8a249..41c7be1c461 100644
--- a/packaging/linux-kernel.spec
+++ b/packaging/linux-kernel.spec
@@ -18,6 +18,7 @@ BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root
%define fullVersion %{version}-%{build_id}
BuildRequires: linux-glibc-devel
+BuildRequires: module-init-tools
BuildRequires: u-boot-tools
BuildRequires: bc
# The below is required for building perf
@@ -128,30 +129,43 @@ mv Kconfig %{buildroot}/usr/src/linux-kernel-build-%{fullVersion}/arch/
# 6. Remove files
find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name ".tmp_vmlinux*" -exec rm -f {} \;
-find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "\.*dtb*tmp" -exec rm -f {} \;
-find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*\.*tmp" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name ".gitignore" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name ".*dtb*tmp" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*.*tmp" -exec rm -f {} \;
find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "vmlinux" -exec rm -f {} \;
find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "uImage" -exec rm -f {} \;
find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "zImage" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "test-*" -exec rm -f {} \;
find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*.cmd" -exec rm -f {} \;
-find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*\.ko" -exec rm -f {} \;
-find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*\.o" -exec rm -f {} \;
-find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*\.S" -exec rm -f {} \;
-find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*\.c" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*.ko" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*.o" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*.S" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*.s" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -name "*.c" -exec rm -f {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion} -size 0c -exec rm -f {} \;
find %{buildroot}/usr/include -name "\.install" -exec rm -f {} \;
find %{buildroot}/usr -name "..install.cmd" -exec rm -f {} \;
+# 6.1 Clean Documentation directory
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion}/Documentation -type f ! -name "Makefile" ! -name "*.sh" ! -name "*.pl" -exec rm -f {} \;
+
rm -rf %{buildroot}/boot/vmlinux*
rm -rf %{buildroot}/System.map*
rm -rf %{buildroot}/vmlinux*
-# 7. Create symbolic links
+# 7. Update file permisions
+%define excluded_files ! -name "*.h" ! -name "*.cocci" ! -name "*.tst" ! -name "*.y" ! -name "*.in" ! -name "*.gperf" ! -name "*.PL" ! -name "lex*" ! -name "check-perf-tracei.pl" ! -name "*.*shipped" ! -name "*asm-generic" ! -name "Makefile*" ! -name "*.lds" ! -name "mkversion" ! -name "zconf.l" ! -name "README" ! -name "*.py" ! -name "gconf.glade" ! -name "*.cc" ! -name "dbus_contexts" ! -name "*.pm" ! -name "*.xs" ! -name "*.l" ! -name "EventClass.py" ! -name "typemap" ! -name "net_dropmonitor.py"
+
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion}/tools/perf/scripts/ -type f %{excluded_files} -exec chmod 755 {} \;
+find %{buildroot}/usr/src/linux-kernel-build-%{fullVersion}/scripts/ -type f %{excluded_files} -exec chmod 755 {} \;
+find %{buildroot}/usr -type f ! -name "check-perf-tracei.pl" -name "*.sh" -name "*.pl" -exec chmod 755 {} \;
+find %{buildroot}/lib/modules/ -name "*.ko" -type f -exec chmod 755 {} \;
+
+# 8. Create symbolic links
rm -f %{buildroot}/lib/modules/%{fullVersion}/build
rm -f %{buildroot}/lib/modules/%{fullVersion}/source
ln -sf /usr/src/linux-kernel-build-%{fullVersion} %{buildroot}/lib/modules/%{fullVersion}/build
-find %{buildroot}/lib/modules/ -name "*.ko" -type f -exec chmod 755 {} \;
-
%clean
rm -rf %{buildroot}