Commit 0989eec9 authored by lyxell's avatar lyxell Committed by GitHub

Merge pull request #692 from jam7/strip

Strip binaries and libraries from several packages
parents afb90b6c 8ddd7017
require 'package' require 'package'
class Diffutils < Package class Diffutils < Package
version '3.5' version '3.5-1'
source_url 'ftp://ftp.gnu.org/gnu/diffutils/diffutils-3.5.tar.xz' source_url 'ftp://ftp.gnu.org/gnu/diffutils/diffutils-3.5.tar.xz'
source_sha1 '1169cce8eaaf7290dc087d65db7ed75de0dceb93' source_sha1 '1169cce8eaaf7290dc087d65db7ed75de0dceb93'
...@@ -13,6 +13,10 @@ class Diffutils < Package ...@@ -13,6 +13,10 @@ class Diffutils < Package
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install-strip"
end
def self.check
system "make", "check"
end end
end end
require 'package' require 'package'
class Ed < Package class Ed < Package
version '1.14.2' version '1.14.2-1'
source_url 'http://ftpmirror.gnu.org/ed/ed-1.14.2.tar.lz' source_url 'http://ftpmirror.gnu.org/ed/ed-1.14.2.tar.lz'
source_sha1 '3e8aa331ffbc929884107ff3f8fbd76d01252277' source_sha1 '3e8aa331ffbc929884107ff3f8fbd76d01252277'
...@@ -14,7 +14,7 @@ class Ed < Package ...@@ -14,7 +14,7 @@ class Ed < Package
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install-strip"
end end
def self.check def self.check
......
require 'package' require 'package'
class Gawk < Package class Gawk < Package
version '4.1.4' version '4.1.4-1'
source_url 'http://ftp.gnu.org/gnu/gawk/gawk-4.1.4.tar.xz' source_url 'http://ftp.gnu.org/gnu/gawk/gawk-4.1.4.tar.xz'
source_sha1 'd67e00e2f6178e9cbd2c0ba923ae157bc0b3b570' source_sha1 'd67e00e2f6178e9cbd2c0ba923ae157bc0b3b570'
depends_on 'libsigsegv'
depends_on 'readline' => :build
depends_on 'ncurses'
depends_on 'mpfr'
depends_on 'gmp'
def self.build def self.build
system './configure --prefix=/usr/local' system './configure', '--prefix=/usr/local'
system "make" system 'make'
system "find . -name '*.so' -print | xargs strip -S"
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install-strip"
end
def self.check
system 'make', 'check'
end end
end end
require 'package' require 'package'
class Groff < Package class Groff < Package
version '1.22.3' version '1.22.3-1'
source_url 'http://ftp.gnu.org/gnu/groff/groff-1.22.3.tar.gz' source_url 'http://ftp.gnu.org/gnu/groff/groff-1.22.3.tar.gz'
source_sha1 '61a6808ea1ef715df9fa8e9b424e1f6b9fa8c091' source_sha1 '61a6808ea1ef715df9fa8e9b424e1f6b9fa8c091'
def self.build def self.build
system './configure' system 'INSTALL_PROGRAM=\'${INSTALL} -s\' ./configure'
# force to compile in sequential since groff Makefile doesn't work in parallel # force to compile in sequential since groff Makefile doesn't work in parallel
system 'make', '-j1' system 'make', '-j1'
...@@ -15,4 +15,8 @@ class Groff < Package ...@@ -15,4 +15,8 @@ class Groff < Package
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end end
def self.check
system "make", "check"
end
end end
require 'package' require 'package'
class Libffi < Package class Libffi < Package
version '3.2.1-1' version '3.2.1-2'
source_url 'ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz' source_url 'ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz'
source_sha1 '280c265b789e041c02e5c97815793dfc283fb1e6' source_sha1 '280c265b789e041c02e5c97815793dfc283fb1e6'
def self.build def self.build
system "./configure", "--enable-shared", "--disable-static", "--with-pic", "--disable-debug", "--disable-dependency-tracking" system "./configure", "--enable-shared", "--disable-static", "--with-pic", "--disable-debug", "--disable-dependency-tracking"
system "make" system "make"
system "find . -name 'lib*.so.*' -print | xargs strip -S"
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install-strip"
end end
def self.check def self.check
......
require 'package' require 'package'
class Libpipeline < Package class Libpipeline < Package
version '1.4.1-1' version '1.4.1-2'
source_url 'https://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.4.1.tar.gz' source_url 'https://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.4.1.tar.gz'
source_sha1 'b31cc955f22b1aa4545dc8d00ddbde831936594f' source_sha1 'b31cc955f22b1aa4545dc8d00ddbde831936594f'
def self.build def self.build
system './configure', '--disable-static', '--enable-shared', '--with-pic' system './configure', '--disable-static', '--enable-shared', '--with-pic'
system 'make' system 'make'
system "find . -name 'lib*.so.*' -print | xargs strip -S"
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install-strip"
end
def self.check
system "make", "check"
end end
end end
require 'package' require 'package'
class Lzip < Package class Lzip < Package
version '1.19' version '1.19-1'
source_url 'http://download.savannah.gnu.org/releases/lzip/lzip-1.19.tar.gz' source_url 'http://download.savannah.gnu.org/releases/lzip/lzip-1.19.tar.gz'
source_sha1 'c6042a786b69e3209112fa991806e2e7e0ba5f07' source_sha1 'c6042a786b69e3209112fa991806e2e7e0ba5f07'
...@@ -12,7 +12,7 @@ class Lzip < Package ...@@ -12,7 +12,7 @@ class Lzip < Package
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install-strip"
end end
def self.check def self.check
......
require 'package' require 'package'
class Sqlite < Package class Sqlite < Package
version '3.18.0' version '3.18.0-1'
source_url 'https://www.sqlite.org/2017/sqlite-autoconf-3180000.tar.gz' source_url 'https://www.sqlite.org/2017/sqlite-autoconf-3180000.tar.gz'
source_sha1 '74559194e1dd9b9d577cac001c0e9d370856671b' source_sha1 '74559194e1dd9b9d577cac001c0e9d370856671b'
def self.build def self.build
system "./configure", "--disable-static", "--enable-shared", "--with-pic" system "./configure", "--disable-static", "--enable-shared", "--with-pic"
system "make" system "make"
system "find . -name 'lib*.so.*' -print | xargs strip -S"
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install-strip"
end end
end end
require 'package' require 'package'
class Vim < Package class Vim < Package
version '8.0' version '8.0-1'
source_url 'ftp://ftp.vim.org/pub/vim/unix/vim-8.0.tar.bz2' source_url 'ftp://ftp.vim.org/pub/vim/unix/vim-8.0.tar.bz2'
source_sha1 '54bb7fe631ed8eaea5675ec934e88b0da1f1eca0' source_sha1 '54bb7fe631ed8eaea5675ec934e88b0da1f1eca0'
depends_on 'ncurses' depends_on 'ncurses'
depends_on 'perl' depends_on 'perl' => :build
depends_on 'python27' depends_on 'python27' => :build
depends_on 'ruby' depends_on 'ruby' => :build
def self.build def self.build
system './configure --prefix=/usr/local --enable-gui=no --with-features=huge --without-x --disable-nls --enable-multibyte --with-tlib=ncurses --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --with-ruby-command=/usr/local/bin/ruby --disable-selinux' system './configure --prefix=/usr/local --enable-gui=no --with-features=huge --without-x --disable-nls --enable-multibyte --with-tlib=ncurses --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --with-ruby-command=/usr/local/bin/ruby --disable-selinux'
...@@ -17,6 +17,7 @@ class Vim < Package ...@@ -17,6 +17,7 @@ class Vim < Package
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/vim"
puts "\nMake sure to put your .vim directory in a subdirectory of /usr/local so it has execute permissions" puts "\nMake sure to put your .vim directory in a subdirectory of /usr/local so it has execute permissions"
puts "You can then symlink to your home directory so vim can see it" puts "You can then symlink to your home directory so vim can see it"
......
require 'package' require 'package'
class Xzutils < Package class Xzutils < Package
version '5.2.3-1' version '5.2.3-2'
source_url 'http://tukaani.org/xz/xz-5.2.3.tar.gz' source_url 'http://tukaani.org/xz/xz-5.2.3.tar.gz'
source_sha1 '529638eec3597e429cc54c74551ac0a89169e841' source_sha1 '529638eec3597e429cc54c74551ac0a89169e841'
...@@ -11,7 +11,10 @@ class Xzutils < Package ...@@ -11,7 +11,10 @@ class Xzutils < Package
end end
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install-strip"
# strip debug symbol from library
system "strip -S #{CREW_DEST_DIR}/usr/local/lib/liblzma.so.*"
end end
def self.check def self.check
......
require 'package' require 'package'
class Zlibpkg < Package class Zlibpkg < Package
version '1.2.11' version '1.2.11-1'
source_url 'http://www.zlib.net/zlib-1.2.11.tar.gz' source_url 'http://www.zlib.net/zlib-1.2.11.tar.gz'
source_sha1 'e6d119755acdf9104d7ba236b1242696940ed6dd' source_sha1 'e6d119755acdf9104d7ba236b1242696940ed6dd'
...@@ -12,8 +12,12 @@ class Zlibpkg < Package ...@@ -12,8 +12,12 @@ class Zlibpkg < Package
def self.install def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install" system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
# remove static library since there is no configuration option to not create it. # remove static library since there is no configuration option to not create it.
system "rm", "#{CREW_DEST_DIR}/usr/local/lib/libz.a" system "rm", "#{CREW_DEST_DIR}/usr/local/lib/libz.a"
# strip library
system "strip -S #{CREW_DEST_DIR}/usr/local/lib/libz.so.*"
end end
def self.check def self.check
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment