Sun, 29 May 2011 16:29:06 +0200
Update, correct, improve build configuration and packaging logic.
Update to new version of vendor software, bump copyright date, remove implicit
gcc dependency, add comments for Trolltech bug tracking, correct enforced
dynamic library linkage, and install mysterious process stub binary.
1 ##
2 ## rpmpopt -- OpenPKG RPM POPT Configuration
3 ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
5 ##
6 ## Permission to use, copy, modify, and distribute this software for
7 ## any purpose with or without fee is hereby granted, provided that
8 ## the above copyright notice and this permission notice appear in all
9 ## copies.
10 ##
11 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
12 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
14 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
15 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
19 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
21 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22 ## SUCH DAMAGE.
23 ##
24 ## The purpose of this configuration file is to extend and override
25 ## the "rpmpopt" directives in the default RPM POPT configuration with
26 ## OpenPKG specific extensions and adjustments.
27 ##
29 # backward compatibility for old RPM extensions
30 rpm exec --stowaway echo "install \"openpkg-tools\" and use \"openpkg stowaway\" now please."
31 rpm exec --makeproxy echo "install \"openpkg-tools\" and use \"openpkg makeproxy\" now please."
32 rpm exec --fetch echo "install \"openpkg-tools\" and use \"openpkg fetch\" now please."
34 # RPM exentsion: "rpm -bs --[no]restriction"
35 rpm alias --restriction --define "restriction yes" \
36 --POPTdesc=$"exclude %NoSource files in .src.rpm"
37 rpm alias --norestriction --define "restriction no" \
38 --POPTdesc=$"include %NoSource files in .src.rpm"
40 # RPM extension: "rpm --with[out] <name>"
41 rpm alias --with --define "with_!#:+ yes" \
42 --POPTdesc=$"set '%option with_<name> yes'" \
43 --POPTargs=$"<name>"
44 rpm alias --without --define "with_!#:+ no" \
45 --POPTdesc=$"set '%option with_<name> no'" \
46 --POPTargs=$"<name>"
48 # RPM extension: "rpm --option <name> <value>"
49 rpm alias --option --define "!#:+ !#:+" \
50 --POPTdesc=$"set '%option <name> <value>'" \
51 --POPTargs=$"<name> <value>"
53 # RPM extension: "rpm --tag <string>"
54 rpm alias --tag --define "l_tag_fmt !#:+" \
55 --POPTdesc=$"set 'binary package filename tag'" \
56 --POPTargs=$"<string>"
58 # RPM extension: "rpm --db-{build,rebuild,cleanup,fixate}"
59 rpm exec --db-build rpmdb --build \
60 --POPTdesc=$"RPM database administration: build new database (destructive operation; you have to know what you are doing)"
61 rpm exec --db-rebuild rpmdb --rebuild \
62 --POPTdesc=$"RPM database administration: rebuild new from old database (upgrading operation; reasonable after upgrades or on DB corruption)"
63 rpm exec --db-cleanup rpmdb --cleanup \
64 --POPTdesc=$"RPM database administration: cleanup existing database (cleaning operation; reasonable after DB out-of-sync situations)"
65 rpm exec --db-fixate rpmdb --fixate \
66 --POPTdesc=$"RPM database administration: fixate existing database (harmless operation; for fixating files only)"
68 # RPM extension: "rpm --db-private ..."
69 rpm alias --db-private --define "_rpmdb_private yes" \
70 --POPTdesc=$"operate RPM database in Berkeley-DB DB_PRIVATE mode"
72 # RPM extension: "rpm --track"
73 rpm alias --track -bt \
74 --POPTdesc=$"run package vendor source tracking script (%track)"
76 # RPM extension: "rpm --track-dump"
77 rpm alias --track-dump -bt --define '___track_dump yes' \
78 --POPTdesc=$"dump the vendor source tracking script (%track)"
80 # RPM extension: "rpm --test"
81 rpm alias --test -q --qf '%{TEST}\n' \
82 --pipe "grep -v \(none\) | @l_prefix@/lib/openpkg/bash" \
83 --POPTdesc=$"run package run-time test script (%test)"
85 # RPM adjustment: "rpm --setperms ..."
86 rpm alias --setperms -q --qf \
87 '[\[ -h %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \
88 --pipe "grep -v '(none)' | sed 's/chmod .../chmod /' | @l_prefix@/lib/openpkg/bash" \
89 --POPTdesc=$"set permissions of files in a package"
91 # RPM adjustment: "rpm --setugids ..."
92 rpm alias --setugids -q --qf \
93 '[run %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
94 --pipe "(echo 'run () { chown -- \"$1\" \"$3\"; chgrp -- \"$2\" \"$3\"; }'; grep -v '(none)') | @l_prefix@/lib/openpkg/bash" \
95 --POPTdesc=$"set user/group ownership of files in a package"
97 # RPM adjustment: improved and cleaned up "rpm -i/--info"
98 rpmq alias --info --qf '\
99 Name: %-25{NAME} Source RPM: %{SOURCERPM}\n\
100 Version: %-25{VERSION} Signature: %|DSAHEADER?{dsa:%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{rsa:%{RSAHEADER:pgpsig}}:{%|SIGGPG?{gpg:%{SIGGPG:pgpsig}}:{%|SIGPGP?{pgp:%{SIGPGP:pgpsig}}:{%|SIGMD5?{md5:%{SIGMD5}}:{(none)}|}|}|}|}|\n\
101 Release: %-25{RELEASE} Build Host: %{BUILDHOST}\n\
102 Group: %-25{GROUP} Build System: %{ARCH}-%{OS}\n\
103 Class: %-25{CLASS} Build Time: %{BUILDTIME:date}\n\
104 Distrib: %-25{DISTRIBUTION} Install Time: %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n\
105 License: %-25{LICENSE} Install Size: %{SIZE} bytes\n\
106 Packager: %-25{PACKAGER} Relocations: %|PREFIXES?{[%{PREFIXES} ]}:{(not relocateable)}|\n\
107 Vendor: %{VENDOR}\n\
108 Summary: %{SUMMARY}\n\
109 URL: %{URL}\n\
110 Description:\n%{DESCRIPTION}\n\
111 %|PROVIDENAME?{Provides:\n\
112 [ %{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]}:{}|\
113 ' --POPTdesc=$"list descriptive information from package(s)"