Skip to content

Instantly share code, notes, and snippets.

@iley
Created October 21, 2011 09:18
Show Gist options
  • Save iley/1303426 to your computer and use it in GitHub Desktop.
Save iley/1303426 to your computer and use it in GitHub Desktop.
Script for building intelib debian package
#!/usr/bin/perl -wl
use strict;
my $version = (split / /, `cat Version`)[0];
my $arch = 'amd64';
my $control =
"Package: intelib\
Version: $version\
Architecture: $arch\
Maintainer: Ilya Strukov <iley\@iley.ru>\
Depends: libreadline6\
Priority: optional\
Description: InteLib Library and accompanying software.\
";
system
"mkdir -p pkg/DEBIAN &&\
echo '$control' > pkg/DEBIAN/control &&\
make -j8 &&\
make install INTSTALLMODE=native PREFIX=/usr DESTDIR=`pwd`/pkg &&\
dpkg -b pkg &&\
mv pkg.deb intelib_${version}_${arch}.deb &&\
rm -rf pkg";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment