Perl2Package

 view release on metacpan or  search on metacpan

lib/Distribution.pm  view on Meta::CPAN


    print STDERR "Fixing file permissions in $dir\n" if $self->{'verbose'};
    chdir $dir || die "Failed to chdir to $dir: $!";
    my $handler = sub {
	my($dev, $ino, $mode, $nlink, $uid, $gid) = stat;
	my $new_mode = 0444;
	$new_mode |= 0200 if $mode & 0200;
	$new_mode |= 0111 if $mode & 0100;
	chmod $new_mode, $_
	  or die "Failed to change mode of $File::Find::name: $!";
	if ($self->{chown}) {
	    chown 0, 0, $_
	      or die "Try --nochown; failed chown of $File::Find::name: $!";
	}
    };

    #    $dir = File::Spec->curdir();
    $dir = Cwd::cwd();
    print STDERR "Returning to directory  $dir\n" if $self->{'verbose'};
    File::Find::find($handler, $dir);
}

sub Prep {

lib/Distribution/RPM.pm  view on Meta::CPAN

Requires: perl >= 5.6
EOF

	if (my $req = $self->{'require'}) {
	    $specs .= "Requires: " . join(" ", @$req) . "\n";
	}

	my $runtests = $self->{'runtests'} ? " --runtests" : "";

	#Normally files should be owned by root.  If we are non root
	#then we can't do chowns (on any civilised operating system
	#;-) so we have to fix the ownership with a command.

	# This is a warning because there might be modules which might
	# install their own userid for security reasons or set files
	# to other ownership's deliberately.  It is the responsibility
	# of the packager to be aware of this.

	my $defattr;
	if ($self->{'defattr'}) {
	    $defattr="";

lib/MakeRPM.pm  view on Meta::CPAN

#$ID = '$Id: makerpm.pl,v 1.30 2004/02/08 17:29:25 mikedlr Exp $ ';

=head1 HEY NOW

 modularized from https://metacpan.org/pod/release/MIKEDLR/makerpm-0.409/makerpm.plfor convenience.

=cut

sub go {
	my ($class,%p) = @_;
    my $chown; 
    $chown = ( $> ? 0 : 1 );	#chown is default if running as root.
    my %o = (%p,'auto-desc' => 1, 'chown' => $chown , 'defattr' => 1, 
	      'name-prefix' => 1, 'makeperlopts' => [], 
	      'makemakeropts' => []);

    if ($o{'version'}) {
	print "$VERSTR\n"; exit 1;
    }
    $o{'verbose'} = 1 if $o{'debug'};


    exists $o{'ppm'} || exists $o{'prep'} || exists $o{'build'} || exists $o{'install'}

lib/MakeRPM.pm  view on Meta::CPAN


    print STDERR "Fixing file permissions in $dir\n" if $self->{'verbose'};
    chdir $dir || die "Failed to chdir to $dir: $!";
    my $handler = sub {
	my($dev, $ino, $mode, $nlink, $uid, $gid) = stat;
	my $new_mode = 0444;
	$new_mode |= 0200 if $mode & 0200;
	$new_mode |= 0111 if $mode & 0100;
	chmod $new_mode, $_
	  or die "Failed to change mode of $File::Find::name: $!";
	if ($self->{chown}) {
	    chown 0, 0, $_
	      or die "Try --nochown; failed chown of $File::Find::name: $!";
	}
    };

    #    $dir = File::Spec->curdir();
    $dir = Cwd::cwd();
    print STDERR "Returning to directory  $dir\n" if $self->{'verbose'};
    File::Find::find($handler, $dir);
}

sub Prep {



( run in 0.745 second using v1.01-cache-2.11-cpan-5511b514fd6 )