Ignore:
Timestamp:
Apr 7, 2020, 8:01:09 PM (5 years ago)
Author:
tellie
Message:

spec: fribidi: Release version 0.19.5-1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/cmake.spec

    r936 r1695  
    1 #define svn_url     e:/trees/cmake/trunk
    2 %define svn_url     http://svn.netlabs.org/repos/ports/cmake/trunk
    3 %define svn_rev     1949
    4 
     1# Do we add appdata-files? (disabled)
     2# consider conditional on whether %%_metainfodir is defined or not instead -- rex
     3%bcond_with appdata
     4
     5# Set to bcond_without or use --with bootstrap if bootstrapping a new release
     6# or architecture
     7%bcond_without bootstrap
     8
     9# Build with Emacs support (disabled)
     10%bcond_with emacs
     11
     12# Run git tests (disabled)
     13%bcond_with git_test
    514
    615# Set to bcond_with or use --without gui to disable qt4 gui build
    716%bcond_without gui
    817
    9 # Set to bcond_without or use --with desktop to enable desktopn stuff
    10 %bcond_with desktop
     18# Use ncurses for colorful output
     19%bcond_without ncurses
     20
     21# Setting the Python-version used by default
     22%bcond_with python3
     23
     24# Enable RPM dependency generators for cmake files written in Python
     25%bcond_without rpm
     26
     27# enable this when we have Sphinx-build (disabled)
     28%bcond_with sphinx
     29
     30# Run tests (disabled)
     31%bcond_with test
     32
     33# Enable X11 tests (disabled)
     34%bcond_with X11_test
    1135
    1236# Place rpm-macros into proper location
     
    1640%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
    1741
    18 # enable this when we have Sphinx-build
    19 %bcond_with sphinx
    20 
    2142%global major_version 3
    22 %global minor_version 7
     43%global minor_version 10
     44# Set to RC version if building RC, else %%{nil}
     45#global rcsuf rc3
     46%{?rcsuf:%global relsuf .%{rcsuf}}
     47%{?rcsuf:%global versuf -%{rcsuf}}
     48
     49# Uncomment if building for EPEL
     50#global name_suffix %%{major_version}
    2351%global orig_name cmake
    2452
    2553
    2654Name:           %{orig_name}%{?name_suffix}
    27 Version:        %{major_version}.%{minor_version}.0
    28 Release:        2%{?dist}
     55Version:        %{major_version}.%{minor_version}.3
     56Release:        1%{?dist}
    2957Summary:        Cross-platform make system
    3058
     
    3765URL:            http://www.cmake.org
    3866Vendor:         bww bitwise works GmbH
    39 Source:         %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
     67%scm_source github http://github.com/bitwiseworks/cmake-os2 master
    4068Source2:        macros.%{name}
    41 
    42 
     69# See https://bugzilla.redhat.com/show_bug.cgi?id=1202899
     70Source3:        %{name}.attr
     71Source4:        %{name}.prov
     72Source5:        %{name}.req
     73
     74BuildRequires:  coreutils
     75BuildRequires:  findutils
     76BuildRequires:  gcc
    4377#BuildRequires:  gcc-gfortran
    44 #BuildRequires:  ncurses-devel, libX11-devel
     78BuildRequires:  sed
     79BuildRequires:  git
     80%if %{with X11_test}
     81BuildRequires:  libX11-devel
     82%endif
     83%if %{with ncurses}
     84BuildRequires:  ncurses-devel
     85%endif
     86%if %{with sphinx}
     87BuildRequires:  %{_bindir}/sphinx-build
     88%endif
     89%if %{without bootstrap}
    4590BuildRequires:  bzip2-devel
    4691BuildRequires:  curl-devel
     
    4994#BuildRequires:  libarchive-devel
    5095#BuildRequires:  libuv-devel
    51 %if 0%{?with_sphinx:1}
    52 BuildRequires:  /@unixroot/usr/bin/sphinx-build
    53 %endif
     96#BuildRequires:  rhash-devel
    5497BuildRequires:  xz-devel
    5598BuildRequires:  zlib-devel
    56 #BuildRequires:  emacs
     99%endif
     100%if %{with emacs}
     101BuildRequires:  emacs
     102%endif
     103%if %{with rpm}
     104%if %{with python3}
     105%{!?python3_pkgversion: %global python3_pkgversion 3}
     106BuildRequires:  python%{python3_pkgversion}-devel
     107%else
    57108BuildRequires:  python2-devel
     109%endif
     110%endif
    58111%if %{with gui}
    59 BuildRequires: libqt4-devel
    60 #BuildRequires: desktop-file-utils
    61 %global qt_gui --qt-gui
     112BuildRequires: pkgconfig(Qt5Widgets)
     113%if %{with appdata}
     114BuildRequires: desktop-file-utils
     115%endif
     116%endif
     117
     118%if %{without bootstrap}
     119# Ensure we have our own rpm-macros in place during build.
     120BuildRequires:  %{name}-rpm-macros
    62121%endif
    63122
    64123Requires:       %{name}-data = %{version}-%{release}
    65 Requires:       rpm
     124Requires:       %{name}-rpm-macros = %{version}-%{release}
     125Requires:       %{name}-filesystem = %{version}-%{release}
    66126
    67127# Provide the major version name
     
    81141Summary:        Common data-files for %{name}
    82142Requires:       %{name} = %{version}-%{release}
     143Requires:       %{name}-filesystem = %{version}-%{release}
     144Requires:       %{name}-rpm-macros = %{version}-%{release}
     145%if %{with emacs}
     146Requires:       emacs-filesystem%{?_emacs_version: >= %{_emacs_version}}
     147%endif
     148
    83149BuildArch:      noarch
    84150
     
    95161
    96162
     163%package        filesystem
     164Summary:        Directories used by CMake modules
     165
     166%description    filesystem
     167This package owns all directories used by CMake modules.
     168
     169
     170%if %{with gui}
    97171%package        gui
    98172Summary:        Qt GUI for %{name}
    99173
    100174Requires:       %{name} = %{version}-%{release}
    101 #Requires:       hicolor-icon-theme
    102 #Requires:       shared-mime-info
     175%if %{with appdata}
     176Requires:       hicolor-icon-theme
     177Requires:       shared-mime-info
     178%endif
    103179
    104180%description    gui
    105181The %{name}-gui package contains the Qt based GUI for %{name}.
     182%endif
     183
     184
     185%package        rpm-macros
     186Summary:        Common RPM macros for %{name}
     187Requires:       rpm
     188# when subpkg introduced
     189Conflicts:      cmake-data < 3.10.1-2
     190
     191BuildArch:      noarch
     192
     193%description    rpm-macros
     194This package contains common RPM macros for %{name}.
    106195
    107196
     
    110199
    111200%prep
    112 %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}
    113 %setup -q
     201%scm_setup
     202
     203%if %{with rpm}
     204%if %{with python3}
     205echo '#!%{__python3}' > %{name}.prov
     206echo '#!%{__python3}' > %{name}.req
    114207%else
    115 %setup -n "%{name}-%{version}" -Tc
    116 svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
    117 rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
    118 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
     208echo '#!%{__python2}' > %{name}.prov
     209echo '#!%{__python2}' > %{name}.req
     210%endif
     211tail -n +2 %{SOURCE4} >> %{name}.prov
     212tail -n +2 %{SOURCE5} >> %{name}.req
    119213%endif
    120214
     
    128222cd build
    129223#             --%{?with_bootstrap:no-}system-libs \
     224#             --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \
    130225../bootstrap --prefix=%{_prefix} --datadir=/share/%{name} \
    131226             --docdir=/share/doc/%{name} --mandir=/share/man \
    132227             --verbose --system-bzip2 --system-curl --system-expat \
    133228             --system-liblzma --system-zlib \
    134              %{?with_sphinx:--sphinx-man --sphinx-html} \
    135              %{?qt_gui} -- \
    136              -DCMAKE_USE_OPENSSL:BOOL=ON
    137 
    138 make
     229%if %{with sphinx}
     230             --sphinx-man --sphinx-html} \
     231%else
     232             --sphinx-build=%{_bindir}/false \
     233%endif
     234             --%{!?with_gui:no-}qt-gui \
     235             -- -DCMAKE_USE_OPENSSL:BOOL=ON \
     236;
     237make VERBOSE=1
    139238
    140239
    141240%install
    142 cd build
    143 make install DESTDIR=%{buildroot}
     241rm -rf %{buildroot}
     242mkdir -p %{buildroot}%{_pkgdocdir}
     243%make_install -C build CMAKE_DOC_DIR=%{buildroot}%{_pkgdocdir}
    144244find %{buildroot}/%{_datadir}/%{name}/Modules -type f | xargs chmod -x
    145245[ -n "$(find %{buildroot}/%{_datadir}/%{name}/Modules -name \*.orig)" ] &&
    146246  echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" &&
    147247  exit 1
    148 cd ..
    149 
     248# Install major_version name links
     249%{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s ${f}.exe %{buildroot}%{_bindir}/${f}%{major_version}; done}
     250# Install bash completion symlinks
     251#mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
     252#for f in %{buildroot}%{_datadir}/%{name}/completions/*
     253#do
     254#  ln -s ../../%{name}/completions/$(basename $f) %{buildroot}%{_datadir}/bash-completion/completions
     255#done
     256%if %{with emacs}
     257# Install emacs cmake mode
     258mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name}
     259install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el
     260%{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el
     261mkdir -p %{buildroot}%{_emacs_sitestartdir}
     262install -p -m 0644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir}
     263%endif
    150264# RPM macros
    151265install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name}
    152266sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|%{major_version}|" %{buildroot}%{rpm_macros_dir}/macros.%{name}
    153267touch -r %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name}
    154 
    155 mkdir -p %{buildroot}%{_libdir}/%{name}
     268%if %{with rpm} && 0%{?_rpmconfigdir:1}
     269# RPM auto provides
     270install -p -m0644 -D %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/fileattrs/%{name}.attr
     271install -p -m0755 -D %{name}.prov %{buildroot}%{_prefix}/lib/rpm/%{name}.prov
     272install -p -m0755 -D %{name}.req %{buildroot}%{_prefix}/lib/rpm/%{name}.req
     273%endif
     274mkdir -p %{buildroot}%{_libdir}/%{orig_name}
    156275# Install copyright files for main package
    157276find Source Utilities -type f -iname copy\* | while read f
     
    162281  cp -p $f ./${fname}_${dname}
    163282done
    164 
    165283# Cleanup pre-installed documentation
    166 %if 0%{?with_sphinx:1}
     284%if %{with sphinx}
    167285mv %{buildroot}%{_docdir}/%{name}/html .
    168286%endif
     
    172290cp -pr %{buildroot}%{_datadir}/%{name}/Help %{buildroot}%{_pkgdocdir}
    173291mv %{buildroot}%{_pkgdocdir}/Help %{buildroot}%{_pkgdocdir}/rst
    174 %if 0%{?with_sphinx:1}
     292%if %{with sphinx}
    175293mv html %{buildroot}%{_pkgdocdir}
    176294%endif
    177295
    178 %if %{with desktop}
     296%if %{with gui}
    179297# Desktop file
     298%if %{with appdata}
    180299desktop-file-install --delete-original \
    181300  --dir=%{buildroot}%{_datadir}/applications \
    182   %{buildroot}/%{_datadir}/applications/CMake%{?name_suffix}.desktop
    183 %endif
    184 
    185 
     301  %{buildroot}%{_datadir}/applications/%{name}-gui.desktop
     302
     303# Register as an application to be visible in the software center
     304#
     305# NOTE: It would be *awesome* if this file was maintained by the upstream
     306# project, translated and installed into the right place during `make install`.
     307#
     308# See http://www.freedesktop.org/software/appstream/docs/ for more details.
     309#
     310mkdir -p %{buildroot}%{_metainfodir}
     311cat > %{buildroot}%{_metainfodir}/cmake-gui.appdata.xml <<EOF
     312<?xml version="1.0" encoding="UTF-8"?>
     313<!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
     314<!--
     315EmailAddress: kitware@kitware.com
     316SentUpstream: 2014-09-17
     317-->
     318<application>
     319  <id type="desktop">cmake-gui.desktop</id>
     320  <metadata_license>CC0-1.0</metadata_license>
     321  <name>CMake GUI</name>
     322  <summary>Create new CMake projects</summary>
     323  <description>
     324    <p>
     325      CMake is an open source, cross platform build system that can build, test,
     326      and package software. CMake GUI is a graphical user interface that can
     327      create and edit CMake projects.
     328    </p>
     329  </description>
     330  <url type="homepage">http://www.cmake.org</url>
     331  <screenshots>
     332    <screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png</screenshot>
     333  </screenshots>
     334  <!-- FIXME: change this to an upstream email address for spec updates
     335  <updatecontact>someone_who_cares@upstream_project.org</updatecontact>
     336   -->
     337</application>
     338EOF
     339%endif
     340%endif
     341
     342# create manifests for splitting files and directories for filesystem-package
     343find %{buildroot}%{_datadir}/%{name} -type d | \
     344  sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > data_dirs.mf
     345find %{buildroot}%{_datadir}/%{name} -type f | \
     346  sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > data_files.mf
     347find %{buildroot}%{_libdir}/%{orig_name} -type d | \
     348  sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > lib_dirs.mf
     349find %{buildroot}%{_libdir}/%{orig_name} -type f | \
     350  sed -e 's!^%{buildroot}!"!g' -e 's!$!"!g' > lib_files.mf
     351find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \
     352  sed -e '/.*-gui.exe$/d' -e '/^$/d' -e 's!^%{buildroot}!"!g' -e 's!$!"!g' >> lib_files.mf
     353
     354
     355%if %{with test}
    186356%check
    187 #cd build
    188 #CMake.FileDownload, and CTestTestUpload require internet access
    189 #bin/ctest%{?name_suffix} -V -E 'CMake.FileDownload|CTestTestUpload' %{?_smp_mflags}
    190 #cd ..
    191 
    192 
    193 %if %{with desktop}
    194 %post gui
    195 update-desktop-database &> /dev/null || :
    196 /bin/touch --no-create %{_datadir}/mime || :
    197 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
    198 
    199 %postun gui
    200 update-desktop-database &> /dev/null || :
    201 if [ $1 -eq 0 ] ; then
    202     /bin/touch --no-create %{_datadir}/mime || :
    203     update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
    204     /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
    205     /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
    206 fi
    207 
    208 %posttrans gui
    209 update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
    210 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
    211 %endif
    212 
    213 
    214 %files
     357cd build
     358#CMake.FileDownload, CTestTestUpload, and curl require internet access
     359# RunCMake.CPack_RPM is broken if disttag contains "+", bug #1499151
     360NO_TEST="CMake.FileDownload|CTestTestUpload|curl|RunCMake.CPack_RPM"
     361NO_TEST="$NO_TEST|CPackComponentsForAll-RPM-IgnoreGroup"
     362# RunCMake.File_Generate fails on S390X
     363%ifarch s390x
     364NO_TEST="$NO_TEST|RunCMake.File_Generate"
     365%endif
     366export NO_TEST
     367bin/ctest%{?name_suffix} -V -E "$NO_TEST" %{?_smp_mflags}
     368cd ..
     369%endif
     370
     371
     372%files -f lib_files.mf
    215373%doc %dir %{_pkgdocdir}
    216374%license Copyright.txt*
    217375%license COPYING*
    218 #%{_bindir}/c%{name}.exe
    219 %{_bindir}/%{name}.exe
    220 %{_bindir}/cpack.exe
    221 %{_bindir}/ctest.exe
    222 %if 0%{?with_sphinx:1}
    223 #%{_mandir}/man1/c%{name}.1.*
     376%if %{with sphinx}
     377%{_mandir}/man1/c%{name}.1.*
    224378%{_mandir}/man1/%{name}.1.*
    225 %{_mandir}/man1/cpack.1.*
    226 %{_mandir}/man1/ctest.1.*
     379%{_mandir}/man1/cpack%{?name_suffix}.1.*
     380%{_mandir}/man1/ctest%{?name_suffix}.1.*
    227381%{_mandir}/man7/*.7.*
    228382%endif
    229 %{_libdir}/%{name}/
    230 
    231 
    232 %files data
     383
     384
     385%files data -f data_files.mf
    233386%{_datadir}/aclocal/%{name}.m4
    234 %{_datadir}/%{name}/
    235 %{rpm_macros_dir}/macros.%{name}
     387#%{_datadir}/bash-completion
     388%if %{with emacs}
     389%{_emacs_sitelispdir}
     390%{_emacs_sitestartdir}
     391%endif
    236392
    237393
     
    239395# Pickup license-files from main-pkg's license-dir
    240396# If there's no license-dir they are picked up by %%doc previously
    241 %{?_licensedir:%license %{_datadir}/licenses/%{name}*}
    242 %doc %{_pkgdocdir}/
     397#%{?_licensedir:%license %{_datadir}/licenses/%{name}*}
     398%doc %{_pkgdocdir}
     399
     400
     401%files filesystem -f data_dirs.mf -f lib_dirs.mf
    243402
    244403
     
    246405%files gui
    247406%{_bindir}/%{name}-gui.exe
    248 %if %{with desktop}
     407%if %{with appdata}
     408%{_metainfodir}/*.appdata.xml
    249409%{_datadir}/applications/CMake%{?name_suffix}.desktop
    250410%{_datadir}/mime/packages/
    251411%{_datadir}/icons/hicolor/*/apps/CMake%{?name_suffix}Setup.png
    252412%endif
    253 %if 0%{?with_sphinx:1}
     413%if %{with sphinx}
    254414%{_mandir}/man1/%{name}-gui.1.*
    255415%endif
     
    257417
    258418
     419%files rpm-macros
     420%{rpm_macros_dir}/macros.%{name}
     421%if %{with rpm} && 0%{?_rpmconfigdir:1}
     422%{_rpmconfigdir}/fileattrs/%{name}.attr
     423%{_rpmconfigdir}/%{name}.prov
     424%{_rpmconfigdir}/%{name}.req
     425%endif
     426
     427
    259428%changelog
     429* Mon Sep 16 2019 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.10.3-1
     430- update to vendor version 3.10.3
     431
    260432* Wed Jan 25 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.7.0-2
    261433- adjust def file creation
Note: See TracChangeset for help on using the changeset viewer.