Sun, 03 Apr 2011 13:34:55 +0200
Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.
Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.
michael@196 | 1 | ## |
michael@196 | 2 | ## imap.spec -- OpenPKG RPM Package Specification |
michael@196 | 3 | ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@196 | 4 | ## |
michael@196 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@196 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@196 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@196 | 8 | ## copies. |
michael@196 | 9 | ## |
michael@196 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@196 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@196 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@196 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@196 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@196 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@196 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@196 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@196 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@196 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@196 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@196 | 21 | ## SUCH DAMAGE. |
michael@196 | 22 | ## |
michael@196 | 23 | |
michael@196 | 24 | # package version |
michael@196 | 25 | %define V_here 2007e |
michael@196 | 26 | %define V_real 2007e |
michael@196 | 27 | %define V_subdir 2007e |
michael@196 | 28 | |
michael@196 | 29 | # package information |
michael@196 | 30 | Name: imap |
michael@196 | 31 | Summary: The IMAP Library |
michael@196 | 32 | URL: http://www.washington.edu/imap/ |
michael@196 | 33 | Vendor: University of Washington |
michael@196 | 34 | Packager: OpenPKG Foundation e.V. |
michael@196 | 35 | Distribution: OpenPKG Community |
michael@196 | 36 | Class: BASE |
michael@196 | 37 | Group: Mail |
michael@196 | 38 | License: University of Washington's Free-Fork License |
michael@196 | 39 | Version: %{V_here} |
michael@230 | 40 | Release: 20091030 |
michael@196 | 41 | |
michael@196 | 42 | # package options |
michael@196 | 43 | %option with_ssl yes |
michael@196 | 44 | %option with_pam no |
michael@196 | 45 | %option with_daemons no |
michael@196 | 46 | %option with_mbxdef no |
michael@196 | 47 | |
michael@196 | 48 | # list of sources |
michael@196 | 49 | Source0: ftp://ftp.cac.washington.edu/imap/imap-%{V_real}.tar.Z |
michael@196 | 50 | Patch0: imap.patch |
michael@196 | 51 | |
michael@196 | 52 | # build information |
michael@196 | 53 | Prefix: %{l_prefix} |
michael@196 | 54 | BuildRoot: %{l_buildroot} |
michael@196 | 55 | BuildPreReq: OpenPKG, openpkg >= 20040130, gcc |
michael@196 | 56 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@196 | 57 | %if "%{with_pam}" == "yes" |
michael@196 | 58 | BuildPreReq: PAM |
michael@196 | 59 | PreReq: PAM |
michael@196 | 60 | %endif |
michael@196 | 61 | %if "%{with_ssl}" == "yes" |
michael@196 | 62 | BuildPreReq: openssl |
michael@196 | 63 | PreReq: openssl |
michael@196 | 64 | %endif |
michael@196 | 65 | AutoReq: no |
michael@196 | 66 | AutoReqProv: no |
michael@196 | 67 | %if "%{with_daemons}" == "yes" |
michael@196 | 68 | Conflicts: imaputils |
michael@196 | 69 | %endif |
michael@196 | 70 | |
michael@196 | 71 | %description |
michael@196 | 72 | The IMAP library provides a C API for IMAP client access. |
michael@196 | 73 | It optionally contains the UW IMAP/POP3 daemons, too. |
michael@196 | 74 | |
michael@196 | 75 | %track |
michael@196 | 76 | prog imap = { |
michael@196 | 77 | version = %{V_real} |
michael@196 | 78 | url = ftp://ftp.cac.washington.edu/imap/ |
michael@196 | 79 | regex = imap-(\d+[a-z]?\d?)\.tar\.Z |
michael@196 | 80 | } |
michael@196 | 81 | |
michael@196 | 82 | %prep |
michael@196 | 83 | %setup -q -n imap-%{V_subdir} |
michael@196 | 84 | %patch -p0 |
michael@196 | 85 | |
michael@196 | 86 | %build |
michael@196 | 87 | mflags="%{l_mflags}" |
michael@196 | 88 | cflags="%{l_cflags}" |
michael@196 | 89 | ldflags="%{l_ldflags}" |
michael@196 | 90 | %if "%{with_pam}" == "yes" |
michael@196 | 91 | case "%{l_platform -t}" in |
michael@196 | 92 | *-sunos* ) pamtype=pmb ;; |
michael@196 | 93 | * ) pamtype=pam ;; |
michael@196 | 94 | esac |
michael@196 | 95 | mflags="$mflags PASSWDTYPE=$pamtype" |
michael@196 | 96 | cflags="$cflags -I`%{l_rc} --query pam_incdir`" |
michael@196 | 97 | ldflags="$ldflags -L`%{l_rc} --query pam_libdir`" |
michael@196 | 98 | %endif |
michael@196 | 99 | %if "%{with_mbxdef}" == "yes" |
michael@196 | 100 | mflags="$mflags CREATEPROTO=mbxproto" |
michael@196 | 101 | %endif |
michael@196 | 102 | %if "%{with_ssl}" == "yes" |
michael@196 | 103 | cflags="%{l_cppflags openssl .} $cflags" |
michael@196 | 104 | mflags="$mflags SSLDIR=%{l_prefix}/etc/openssl" |
michael@198 | 105 | mflags="$mflags SSLCERTS=%{l_prefix}/etc/openssl/certs" |
michael@230 | 106 | mflags="$mflags SSLKEYS=%{l_prefix}/etc/openssl/private" |
michael@197 | 107 | mflags="$mflags SSLINCLUDE=%{l_prefix}/include" |
michael@197 | 108 | mflags="$mflags SSLLIB=%{l_prefix}/lib" |
michael@196 | 109 | %else |
michael@196 | 110 | mflags="$mflags SSLTYPE=none" |
michael@196 | 111 | %endif |
michael@196 | 112 | case "%{l_platform -t}" in |
michael@196 | 113 | *-freebsd* ) os=bsf ;; |
michael@196 | 114 | *-linux* ) os=slx ;; |
michael@196 | 115 | *-sunos* ) os=gso ;; |
michael@196 | 116 | *-netbsd* ) os=neb ;; |
michael@196 | 117 | *-irix* ) os=gsg ;; |
michael@196 | 118 | *) echo "Unsupported platform %{l_platform -t}" 1>&2; exit 1 ;; |
michael@196 | 119 | esac |
michael@196 | 120 | mflags="$mflags $os" |
michael@196 | 121 | %{l_make} $mflags \ |
michael@196 | 122 | EXTRACFLAGS="$cflags" \ |
michael@196 | 123 | EXTRALDFLAGS="$ldflags" |
michael@196 | 124 | |
michael@196 | 125 | %install |
michael@196 | 126 | rm -rf $RPM_BUILD_ROOT |
michael@196 | 127 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@196 | 128 | $RPM_BUILD_ROOT%{l_prefix}/include/imap \ |
michael@196 | 129 | $RPM_BUILD_ROOT%{l_prefix}/lib |
michael@196 | 130 | %{l_shtool} install -c -m 644 \ |
michael@196 | 131 | c-client/*.h \ |
michael@196 | 132 | c-client/linkage.c \ |
michael@196 | 133 | $RPM_BUILD_ROOT%{l_prefix}/include/imap/ |
michael@196 | 134 | rm -f $RPM_BUILD_ROOT%{l_prefix}/include/imap/os_*.h |
michael@196 | 135 | %{l_shtool} install -c -m 644 c-client/c-client.a \ |
michael@196 | 136 | $RPM_BUILD_ROOT%{l_prefix}/lib/libimap.a |
michael@196 | 137 | %if "%{with_daemons}" == "yes" |
michael@196 | 138 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@196 | 139 | $RPM_BUILD_ROOT%{l_prefix}/bin \ |
michael@196 | 140 | $RPM_BUILD_ROOT%{l_prefix}/sbin \ |
michael@196 | 141 | $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ |
michael@196 | 142 | $RPM_BUILD_ROOT%{l_prefix}/man/man8 |
michael@196 | 143 | %{l_shtool} install -c -m 755 \ |
michael@196 | 144 | tmail/tmail dmail/dmail mailutil/mailutil \ |
michael@196 | 145 | $RPM_BUILD_ROOT%{l_prefix}/bin/ |
michael@196 | 146 | %{l_shtool} install -c -m 755 \ |
michael@196 | 147 | imapd/imapd ipopd/ipop3d \ |
michael@196 | 148 | $RPM_BUILD_ROOT%{l_prefix}/sbin/ |
michael@196 | 149 | %{l_shtool} install -c -m 644 \ |
michael@196 | 150 | src/tmail/tmail.1 src/dmail/dmail.1 src/mailutil/mailutil.1 \ |
michael@196 | 151 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/ |
michael@196 | 152 | %{l_shtool} install -c -m 644 \ |
michael@196 | 153 | src/imapd/imapd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/imapd.8 |
michael@196 | 154 | %{l_shtool} install -c -m 644 \ |
michael@196 | 155 | src/ipopd/ipopd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/ipopd.8 |
michael@196 | 156 | %endif |
michael@196 | 157 | |
michael@196 | 158 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@196 | 159 | |
michael@196 | 160 | %files -f files |
michael@196 | 161 | |
michael@196 | 162 | %clean |
michael@196 | 163 | rm -rf $RPM_BUILD_ROOT |
michael@196 | 164 |