Changeset 26


Ignore:
Timestamp:
Aug 1, 2007, 3:11:04 PM (11 years ago)
Author:
bruno
Message:

build2pkg begins to work for rpm

Location:
devel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb.pl

    r25 r26  
    1616use AppConfig qw(:argcount :expand);
    1717use File::Basename;
     18use File::Copy;
    1819use Time::localtime qw(localtime);
    1920use POSIX qw(strftime);
     
    317318
    318319            # We need to first extract the spec file
    319             print $LOG "Extracting spec file\n" if ($debug >= 0);
    320             symlink $src,"SOURCES/" || die "Unable to symlink $src in SOURCES";;
    321             chdir "SPECS";
    322             extract_build_files($src,"$pkg-$pbver/pbconf/$ddir-$dver/");
     320            symlink "$src","SOURCES/".basename($src) || die "Unable to symlink $src in SOURCES";;
     321            extract_build_files($src,"$pkg-$pbver/pbconf/$ddir-$dver/","SPECS");
    323322
    324323            # set LANGUAGE to check for correct log messages
    325324            $ENV{'LANGUAGE'}="C";
    326             system("rpmbuild -ba *.spec 2>&1 | tee ");
     325            system("ls -R ");
     326            system("cd SPECS ; rpmbuild -ba *.spec");
    327327
    328328        } elsif ($dtype eq "tgz") {
     
    404404my $src=shift;
    405405my $dir=shift;
    406 
     406my $ddir=shift;
     407
     408print $LOG "Extracting build files... " if ($debug >= 0);
    407409system("tar xfz $src $dir >/dev/null");
    408410if ($? == -1) {
     
    416418foreach my $f (readdir(DIR)) {
    417419    next if ($f =~ /^\./);
    418     rename("$dir/$f",".");
     420    move("$dir/$f","$ddir") || die "Unable to move $dir/$f to $ddir";
     421    print $LOG "mv $dir/$f .\n" if ($debug >= 1);
    419422}
    420423closedir(DIR);
     424# Not enough but still a first cleanup
    421425pbrm_rf("$dir");
    422426}
  • devel/pbconf/pb.pb

    r20 r26  
    1818
    1919# Hash of default package/package directory
    20 defpkgdir projectbuilder = pb
    21 defpkgdir projectbuilder-doc = pb-doc
     20defpkgdir project-builder = pb
     21defpkgdir project-builder-doc = pb-doc
    2222
    2323# Hash of additional package/package directory
  • devel/pbconf/projectbuilder/rpm/pb.spec

    r25 r26  
    1414Source:     PBSRC
    1515BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
    16 BuildRequires: 
    1716BuildArch:  noarch
    1817Requires:   perl >= 5.8.8, PBDEP
Note: See TracChangeset for help on using the changeset viewer.