Skip to content

Commit

Permalink
Merge pull request #24 from jianingy/debian-issues
Browse files Browse the repository at this point in the history
fixed build issues of debian/ubuntu
  • Loading branch information
nmeyerhans committed Mar 20, 2013
2 parents fb5eaf1 + 1fd6573 commit 78f83d5
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
13 changes: 12 additions & 1 deletion index.yaml
@@ -1,9 +1,10 @@
default:
arch: noarch
name: multipkg
version: '1.2'
summary: Automation for package builds (supports RPM, deb)
buildprefix: /usr
rpm:
arch: noarch
provides:
- Seco::Multipkg
- perl-seco-class
Expand All @@ -13,3 +14,13 @@ default:
- subversion-perl
- perl-Git
- perl-Error
deb:
arch: all
provides:
- perl-seco-class
- perl-seco-cpan
requires:
- libfile-fnmatch-perl
- libyaml-syck-perl
- libsvn-perl
- liberror-perl
4 changes: 0 additions & 4 deletions root/usr/share/multipkg/default.yaml
Expand Up @@ -4,12 +4,8 @@ default:
perl: '/usr/bin/perl'
version: '0.0001'
shebangmunge: 1
arch: i686 x86_64
os_specific: no

deb:
perl: '/usr/local/bin/perl'

rpm:
autoreqprov: no
epoch: 20
Expand Down
8 changes: 8 additions & 0 deletions root/usr/share/multipkg/templates/control.template
@@ -0,0 +1,8 @@
Package: %name%
Version: %version%-%release%
Architecture: %arch%
Depends: %requirelist%
Maintainer: %whoami%
Source: %name%
Description:
%summary%
2 changes: 1 addition & 1 deletion scripts/build
@@ -1,6 +1,6 @@
#!/bin/sh

if [ "$PERL" = "" ]; then
if [ ! -x "$PERL" ]; then
PERL=/usr/bin/perl
fi
if [ "$PREFIX" = "" ]; then
Expand Down
12 changes: 11 additions & 1 deletion source/lib/Seco/Multipkg.pm
Expand Up @@ -803,6 +803,11 @@ sub makepackage {

$self->info->data->{rpmtemprepo} = $self->tmpdir . "/rpm";

if ( !$self->info->data->{arch} ) {
$self->info->data->{arch} = `arch`;
chomp $self->info->data->{arch};
}

$self->template_file( $self->info->confdir . "/templates/spec.template",
$self->tmpdir . "/spec" );

Expand Down Expand Up @@ -970,7 +975,12 @@ sub makepackage {
mkdir $self->installdir . "/DEBIAN"
unless ( -d $self->installdir . "/DEBIAN" );

$self->template_file( $self->info->confdir . "/control.template",
if ( !$self->info->data->{arch} ) {
$self->info->data->{arch} = `dpkg --print-architecture`;
chomp $self->info->data->{arch};
}

$self->template_file( $self->info->confdir . "/templates/control.template",
$self->installdir . "/DEBIAN/control" );

my %trans = (
Expand Down

0 comments on commit 78f83d5

Please sign in to comment.