Changeset 163
- Timestamp:
- 04/08/12 22:02:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r162 r163 10 10 # Last update by $Author$ 11 11 ### 12 # Copyright (C) 2005-201 1Kris Deugau <kdeugau@deepnet.cx>12 # Copyright (C) 2005-2012 Kris Deugau <kdeugau@deepnet.cx> 13 13 # 14 14 # This program is free software; you can redistribute it and/or modify … … 32 32 use Config; 33 33 34 my $version = "0.9"; #VERSION# 35 34 36 # regex debugger 35 37 #use re "debug"; 36 38 39 # Behavioural compatibility FTW! Yes, rpmbuild does this too. 37 40 die "No .spec file to work with! Exiting.\n" if scalar(@ARGV) == 0; 38 41 … … 124 127 # Hackery to try to bring some semblance of sanity to packages built for more 125 128 # than one Debian version at the same time. Whee. 126 # /etc/debian-version 129 # /etc/debian-version and/or version of base-files package 127 130 my %distmap = ( 128 131 "3.1.9ubuntu7.1" => "dapper", … … 356 359 # Or not. >:( Stupid Debian lack of findable Perl module names in packages. 357 360 361 # ... also note, single-character options are mostly not flags, so they can't be 362 # sanely combined the way most other programs' single-character flag options can. 363 358 364 # Stuff it. 359 365 my $prevopt = ''; … … 372 378 } elsif (/^--showpkgs/) { 373 379 $cmdopts{type} = 'd'; # d for 'diagnostic' or 'debug' or 'dump' 380 } elsif (/^--help/) { 381 print "debbuild v$version".q{ 382 Copyright 2005-2012 Kris Deugau <kdeugau@deepnet.cx> 383 384 Build .deb packages from RPM-style .spec files 385 debbuild supports most package-building options rpmbuild does. 386 387 Build options with [ <specfile> | <tarball> | <source package> ]: 388 -bp build through %prep (unpack sources and apply patches) from <specfile> 389 -bc build through %build (%prep, then compile) from <specfile> 390 -bi build through %install (%prep, %build, then install) from <specfile> 391 -bl verify %files section from <specfile> 392 -ba build source and binary packages from <specfile> 393 -bb build binary package only from <specfile> 394 -bs build source package only from <specfile> 395 -tp build through %prep (unpack sources and apply patches) from <tarball> 396 -tc build through %build (%prep, then compile) from <tarball> 397 -ti build through %install (%prep, %build, then install) from <tarball> 398 -ta build source and binary packages from <tarball> 399 -tb build binary package only from <tarball> 400 -ts build source package only from <tarball> 401 --rebuild build binary package from <source package> 402 --buildroot=DIRECTORY override build root 403 --short-circuit skip straight to specified stage (only for c,i) 404 405 Common options: 406 -D, --define='MACRO EXPR' define MACRO with value EXPR 407 408 debbuild-specific options: 409 -i Unpack a .sdeb in the %_topdir tree 410 --showpkgs Show package names that would be built. Only works with .spec files. 411 412 }; 413 exit; 414 374 415 } elsif (/^--define/) { 375 416 # nothing to do? Can't see anything needed, we handle the actual definition later. … … 396 437 $cmdopts{install} = 1; 397 438 $prevopt = '-i'; 439 } elsif (/^-D/) { 440 # --define. nothing to do on this round; actual work is done next time. 398 441 } else { 399 442 die "Bad option $_\n"; … … 409 452 if ($prevopt eq '--buildroot') { 410 453 $cmdbuildroot = $_; 411 } elsif ($prevopt eq '--define' ) {454 } elsif ($prevopt eq '--define' || $prevopt eq '-D') { 412 455 my ($macro,$value) = (/([a-z0-9_.-]+)(?:\s+(.+))?/i); 413 456 if ($value ne '') {
Note:
See TracChangeset
for help on using the changeset viewer.