2 # unpack-srcpkg-l2 -- maemian unpack script (source packages level 2)
4 # syntax: unpack-srcpkg-l2 <base-dir>
6 # Copyright (C) 1998 Christian Schwarz and Richard Braakman
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, you can find it on the World Wide
20 # Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
21 # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
25 use vars qw($verbose);
27 use lib "$ENV{'MAEMIAN_ROOT'}/lib";
28 use Maemian::Command qw(spawn);
31 ($#ARGV == 0) or fail("syntax: unpack-srcpkg-l2 <base-dir>");
34 print "N: Unpacking source package in directory $base_dir ...\n" if $verbose;
37 # Ignore STDOUT of the child process because older versions of dpkg-source
38 # print things out even with -q.
39 spawn({ fail => 'error', out => '/dev/null', err => 'unpacked-errors' },
40 ['dpkg-source', '-q', '-x', 'dsc', 'unpacked']);
43 spawn({ fail => 'error' },
44 ['chmod', '-R', 'u+rwX,o+rX,o-w', 'unpacked']);
47 # indent-tabs-mode: nil
48 # cperl-indent-level: 4
50 # vim: syntax=perl sw=4 sts=4 ts=4 et shiftround