Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Creating wine addon packages

Patrick Rudolph edited this page Dec 25, 2018 · 1 revision

For package maintainers

Every stable release is tagged: wine-nine-"major wine"-"patchlevel".

As the wine API is stable, the "major wine" version will be: 2.0, 3.0, 4.0 ...

The "patchlevel" is incremented with every new feature or bugfix on the stable branch.

The stable releases can be build against wine or wine-staging and have no dependencies to 3rd-party patches.

Example of creating a wine addon package on Fedora

Assuptions

  • The addon package will enhance wine and doesn't replace any files.
  • The addon package will only contain files that are required for nine.
  • The addon package has all dependencies to correctly install everything from scratch.
  • The addon package works with vanilla wine and wine staging.
  • The addon package works with all wine minor releases.
  • The addon package must depend on the wine major release number.

Example spec file

The following example is written for the wine-stable-3.0 branch. It is not a complete file, but shows the basic idea.

  1. Create a spec file to build a new package. Add the following lines:

     %define patchlevel 2
     Name:             wine-nine
     Version:          3.0
     Release:          %{?dist}
     Summary:          Wine D3D9 interface library for Mesa's Gallium Nine statetracker
    
  2. Depend on wine package

     Requires:       wine-common >= %{version}
     Enhances:       wine
    
  3. Depend on libraries

     Requires:       mesa-dri-drivers(x86-64)
     Requires:       mesa-libd3d(x86-64)
     Requires:       libxcb(x86-64)
     Requires:       libX11(x86-64)
     Requires:       libXext(x86-64)
    
  4. Add the build step. Deselect all wine features:

     %prep
     %autosetup -n wine-%{name}-%{version}-%{patchlevel}
    
     %build
    
     export PKG_CONFIG_PATH=%{_libdir}/pkgconfig
    
     ./configure \
     --with-x \
     --without-freetype \
     --without-fontconfig \
     --without-curses \
     --without-cms \
     --without-gstreamer \
     --without-alsa \
     --without-capi \
     --without-opencl \
     --without-openal \
     --without-netapi  \
     --without-mpg123 \
     --without-ldap \
     --without-krb5 \
     --without-jpeg \
     --without-gnutls \
     --without-coreaudio \
     --without-dbus \
     --without-cups \
     --without-gsm \
     --without-osmesa \
     --without-oss  \
     --without-pcap \
     --without-png \
     --without-pulse \
     --without-sane \
     --without-tiff \
     --without-udev \
     --without-v4l \
     --without-xinput \
     --without-xinput2 \
     --without-xml \
     --without-xslt \
     --without-zlib \
     --with-d3d9-nine \
     %ifarch x86_64
     --enable-win64 \
     %endif
     --disable-tests
    
  5. Build only the files we need:

     make include
     make __builddeps__
     make d3d9-nine.dll.so -C dlls/d3d9-nine
     make d3d9-nine.dll.fake -C dlls/d3d9-nine
     make programs/ninewinecfg
    
  6. Add the files we have build:

     %files
     %dir %{_libdir}/wine
     %dir %{_libdir}/wine/fakedlls
     %{_libdir}/wine/*.so
     %{_libdir}/wine/fakedlls/*
    
  7. Run ldconfig as we have added libraries:

     %post -p /sbin/ldconfig
     %postun -p /sbin/ldconfig