Changeset 1023
- Timestamp:
- Feb 23, 2017, 12:08:34 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/rpm.spec
r1005 r1023 1 #define svn_url F:/rd/rpm/rpm/trunk2 %define svn_url http://svn.netlabs.org/repos/rpm/rpm/trunk3 %define svn_rev 9874 5 %define with_sqlite 16 %undefine int_bdb7 8 1 # build against xz? 9 2 %bcond_without xz 10 # sqlite backend is pretty useless11 %bcond_with sqlite12 3 # just for giggles, option to build with internal Berkeley DB 13 4 %bcond_with int_bdb … … 29 20 Name: rpm 30 21 Version: %{rpmver} 31 Release: 1 0%{?dist}22 Release: 11%{?dist} 32 23 Group: System Environment/Base 33 24 Url: http://www.rpm.org/ 34 Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip 25 26 %scm_source svn http://svn.netlabs.org/repos/rpm/rpm/trunk 1020 35 27 36 28 # Partially GPL/LGPL dual-licensed and some bits with BSD 37 # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD 29 # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD 38 30 License: GPLv2+ 39 31 … … 51 43 Requires: sed 52 44 45 # We need a fork-friendly PR_LoadLibrary on OS/2 46 Requires: nspr >= 4.12.0-2 47 53 48 Provides: rpm-macros-warpin 54 49 Provides: rpm-macros-wps … … 59 54 BuildRequires: db4-devel 60 55 %endif 61 62 # YD because of libcx63 Requires: db4 > 4.8.30-664 56 65 57 %if %{with check} … … 75 67 BuildRequires: popt-devel >= 1.10.2 76 68 BuildRequires: file-devel 77 BuildRequires: gettext-devel 69 BuildRequires: gettext-devel gettext-common-devel 78 70 BuildRequires: ncurses-devel 79 71 BuildRequires: bzip2-devel >= 0.9.0c-2 … … 85 77 BuildRequires: xz-devel >= 4.999.8 86 78 %endif 87 %if %{with sqlite}88 BuildRequires: sqlite-devel89 %endif90 91 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)92 79 93 80 %description … … 180 167 181 168 %prep 182 %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} 183 %setup -q 184 %else 185 %setup -n "%{name}-%{version}" -Tc 186 svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force 187 rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" 188 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") 189 %endif 169 %scm_setup 190 170 191 171 %if %{with int_bdb} … … 195 175 %build 196 176 177 # Make default paths to tools start with /@unixroot on OS/2 178 sed -i \ 179 -e '/AC_PATH_PROGS\?(/ { 180 s#, \?/usr/#, /@unixroot/usr/# ; 181 s#, \?/bin/#, /@unixroot/usr/bin/# ; 182 s#, \?/sbin/#, /@unixroot/usr/sbin/# ; 183 }' \ 184 configure.ac 185 186 autoreconf -i -f 187 188 # Make tools we don't yet have in OS/2 RPMs pathless 189 export ac_cv_path___SSH=ssh 190 197 191 # Using configure macro has some unwanted side-effects on rpm platform 198 192 # setup, use the old-fashioned way for now only defining minimal paths. 199 export RPM_MKDIR="/@unixroot/usr/bin/mkdir.exe"; \ 200 export CONFIG_SITE="/@unixroot/usr/share/config.legacy"; 201 export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"; \ 202 export LIBS="-lintl -lurpo -lcx"; \ 203 CFLAGS="%{optflags} -I/@unixroot/usr/include/nss3 -I/@unixroot/usr/include/nspr4" ; \ 193 export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" 194 export LIBS="-lintl -lcx" 195 export CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`" 204 196 %configure \ 205 197 --enable-shared --disable-static --without-lua \ 206 198 %{!?with_int_bdb: --with-external-db} \ 207 %{?with_sqlite: --enable-sqlite3} \208 199 --without-archive \ 209 200 --enable-python 210 201 211 make %{?_smp_mflags} 202 make %{?_smp_mflags} V=1 212 203 213 204 %install … … 216 207 make DESTDIR="$RPM_BUILD_ROOT" install 217 208 218 # YD skip pkcconfig requirement 219 #rm ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig/rpm.pc 209 # Remove OS/2 import libraries from plugins 210 rm ${RPM_BUILD_ROOT}%{_libdir}/rpm-plugins/*_dll.a 211 212 # No /bin on OS/2 220 213 mv ${RPM_BUILD_ROOT}/@unixroot/bin/rpm.exe ${RPM_BUILD_ROOT}%{_bindir}/rpm.exe 221 214 222 # YD remove elf attr magic215 # Remove elf attr magic (makes no sense on OS/2) 223 216 rm ${RPM_BUILD_ROOT}%{rpmhome}/fileattrs/elf.attr 224 217 225 # YD remove paths from macros 226 sed -i 's#.:/usr/bin/#/@unixroot/usr/bin/#gi' ${RPM_BUILD_ROOT}%{rpmhome}/macros 227 sed -i 's#.:/bin/#/@unixroot/bin/#gi' ${RPM_BUILD_ROOT}%{rpmhome}/macros 228 sed -i 's#.:/tcpip/bin/#/@bootroot/tcpip/bin/#gi' ${RPM_BUILD_ROOT}%{rpmhome}/macros 229 sed -i 's#.:/bin/tool/##gi' ${RPM_BUILD_ROOT}%{rpmhome}/macros 230 231 # YD install dll 232 install -D -m0755 build/.libs/rpmbuild.dll $RPM_BUILD_ROOT/%{_libdir}/ 233 install -D -m0755 build/.libs/rpmbuild.a $RPM_BUILD_ROOT/%{_libdir}/ 234 install -D -m0755 build/.libs/rpmbuild_s.a $RPM_BUILD_ROOT/%{_libdir}/ 235 install -D -m0755 build/.libs/rpmbuild.lib $RPM_BUILD_ROOT/%{_libdir}/ 236 237 install -D -m0755 lib/.libs/rpm.dll $RPM_BUILD_ROOT/%{_libdir}/ 238 install -D -m0755 lib/.libs/rpm.a $RPM_BUILD_ROOT/%{_libdir}/ 239 install -D -m0755 lib/.libs/rpm_s.a $RPM_BUILD_ROOT/%{_libdir}/ 240 install -D -m0755 lib/.libs/rpm.lib $RPM_BUILD_ROOT/%{_libdir}/ 241 242 install -D -m0755 rpmio/.libs/rpmio.dll $RPM_BUILD_ROOT/%{_libdir}/ 243 install -D -m0755 rpmio/.libs/rpmio.a $RPM_BUILD_ROOT/%{_libdir}/ 244 install -D -m0755 rpmio/.libs/rpmio_s.a $RPM_BUILD_ROOT/%{_libdir}/ 245 install -D -m0755 rpmio/.libs/rpmio.lib $RPM_BUILD_ROOT/%{_libdir}/ 218 # Replace OS/2 paths with /@unixroot and /@system_drive 219 sed -i \ 220 -e 's#[^a-zA-Z][a-zA-Z]:/ecs/#/@system_drive/ecs/#gi' \ 221 -e 's#[^a-zA-Z][a-zA-Z]:/tcpip/bin/#/@system_drive/tcpip/bin/#gi' \ 222 ${RPM_BUILD_ROOT}%{rpmhome}/macros 223 224 # Check there are no paths starting with drive letter or having usr/local 225 ! grep -q \ 226 -e '[^a-zA-Z][a-zA-Z]:/' \ 227 -e '/usr/local' \ 228 ${RPM_BUILD_ROOT}%{rpmhome}/macros 229 230 # Pack OS/2 Rexx scripts 231 for f in wps-object warpin-conflicts ; do 232 rexx2vio "${RPM_BUILD_ROOT}%{rpmhome}/$f.cmd" "${RPM_BUILD_ROOT}%{rpmhome}/$f.exe" 233 rm "${RPM_BUILD_ROOT}%{rpmhome}/$f.cmd" 234 sed -i "s#$f.cmd#$f.exe#gi" ${RPM_BUILD_ROOT}%{rpmhome}/macros 235 done 246 236 247 237 # Save list of packages through cron … … 302 292 #if [ -x "$dbstat" ]; then 303 293 # if "$dbstat" -e -h %{_var}/lib/rpm 2>&1 | grep -q "doesn't match environment version \| Invalid argument"; then 304 # rm -f %{_var}/lib/rpm/__db.* 294 # rm -f %{_var}/lib/rpm/__db.* 305 295 # fi 306 296 #fi … … 356 346 %defattr(-,root,root) 357 347 %{_libdir}/rpm*.dll 358 %{_libdir}/rpm-plugins 348 %dir %{_libdir}/rpm-plugins 349 %{_libdir}/rpm-plugins/*.dll 359 350 360 351 %files build … … 373 364 %{rpmhome}/brp-* 374 365 %{rpmhome}/check-* 375 # %{rpmhome}/debugedit376 # %{rpmhome}/find-debuginfo.sh366 #{rpmhome}/debugedit 367 #{rpmhome}/find-debuginfo.sh 377 368 %{rpmhome}/find-lang.sh 369 %{rpmhome}/find-legacy-runtime.sh 378 370 %{rpmhome}/*provides* 379 371 %{rpmhome}/*requires* … … 382 374 %{rpmhome}/*.req 383 375 %{rpmhome}/config.* 384 %{rpmhome}/mkinstalldirs385 376 %{rpmhome}/macros.p* 386 377 %{rpmhome}/fileattrs … … 394 385 %_includedir/* 395 386 %{_libdir}/rp*[a-z].a 396 %{_libdir}/rp*[a-z].lib397 387 %{_mandir}/man8/rpmgraph.8* 398 388 %{_bindir}/rpmgraph.exe … … 409 399 410 400 %changelog 401 * Thu Feb 23 2017 Dmitriy Kuminov <coding@dmik.org> - 4.13.0-11 402 - Use scm_source and friends. 403 - Use OS/2 autoconf instead of pre-generated configure (this also adds ABI suffix to all DLLs). 404 - Restore using fork (that was replaced by popen) to reduce the number of OS/2-specific hacks. 405 - Fix executing popt aliases with --pipe (like rpm -qa --last). 406 - Use common check-files instead of check-files.os2. 407 - Remove URPO dependency. 408 - Fix a lot of compiler warnings. 409 - Fix paths to Tools defined in macros. 410 411 411 * Fri Feb 10 2017 yd <yd@os2power.com> 4.13.0-10 412 412 - r978, need scriptlet to run upon uninstall to remove WPS objects. ticket#227. … … 452 452 453 453 * Thu Nov 12 2015 yd <yd@os2power.com> 4.8.1-24 454 - r582, allow use of platform specific macros file. fixes ticket#135. 454 - r582, allow use of platform specific macros file. fixes ticket#135. 455 455 - r581, standardize debug package creation. fixes ticket#134. 456 456 457 457 * Wed Feb 25 2015 yd <yd@os2power.com> 4.8.1-23 458 458 - r557, backport r536, Make %find_lang macro work on OS/2. 459 - r558, add support for macros.d directory, fixes ticket#119. 459 - r558, add support for macros.d directory, fixes ticket#119. 460 460 - r536, Make %find_lang macro work on OS/2. 461 461
Note:
See TracChangeset
for help on using the changeset viewer.