#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g CONFFLAGS += --without-ldap ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif ifeq ($(DEB_BUILD_ARCH), amd64) # Support for 64-bit windows binaries is disabled for now until # Wine can be built with both 64 and 32 bit support # CONFFLAGS += --enable-win64 # There are missing symlinks in /usr/lib32, even with the appropriate # build dependencies installed, so we will create symlinks ourselves in # our own temporary library directory LIBTMP := $(shell pwd)/debian/libtmp LDFLAGS += -L$(LIBTMP) CONFFLAGS += --libdir=\$${prefix}/lib32 endif # shared library versions, option 1 #version=2.0.5 #major=2 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so #version=`ls src/.libs/lib*.so.* | \ # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` #major=`ls src/.libs/lib*.so.* | \ # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` config.status: configure dh_testdir # Add here commands to configure the package. # On amd64 we must use our temporary lib directory to create symlinks # since the linker demands *.so files and they are missing from the # 32 bit library packages ifeq ($(DEB_BUILD_ARCH), amd64) mkdir -p $(LIBTMP) ln -s /usr/lib32/libX11.so.6 $(LIBTMP)/libX11.so ln -s /usr/lib32/libXext.so.6 $(LIBTMP)/libXext.so ln -s /usr/lib32/libfreetype.so.6 $(LIBTMP)/libfreetype.so ln -s /usr/lib32/libfontconfig.so.1 $(LIBTMP)/libfontconfig.so ln -s /usr/lib32/libGL.so.1 $(LIBTMP)/libGL.so ln -s /usr/lib32/libGLU.so.1 $(LIBTMP)/libGLU.so ln -s /usr/lib32/libXrender.so.1 $(LIBTMP)/libXrender.so ln -s /usr/lib32/libXinerama.so.1 $(LIBTMP)/libXinerama.so ln -s /usr/lib32/libXi.so.6 $(LIBTMP)/libXi.so ln -s /usr/lib32/libXrandr.so.2 $(LIBTMP)/libXrandr.so ln -s /usr/lib32/liblcms.so.1 $(LIBTMP)/liblcms.so ln -s /usr/lib32/libpng12.so.0 $(LIBTMP)/libpng12.so ln -s /usr/lib32/libcrypto.so.0.9.8 $(LIBTMP)/libcrypto.so ln -s /usr/lib32/libssl.so.0.9.8 $(LIBTMP)/libssl.so endif CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info $(CONFFLAGS) build: build-stamp build-stamp: config.status dh_testdir # Add here commands to compile the package. $(MAKE) # Make the documentation. The dh_installdocs command should install them # Remember to have the files wine.docs and wine-dev.docs point to any new # documentation files made # As of 20050524 as the documentation was split into another package # and all that's here are the foreign language readmes and the manpages. # It should be compiled automatically as the package compiles # $(MAKE) -C documentation txt touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) distclean #-$(MAKE) -C documentation clean # Clean up our temporary library directory ifeq ($(DEB_BUILD_ARCH), amd64) rm -rf $(LIBTMP) endif ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/tmp $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr # Create a system-wide Wine Applications folder mkdir -p $(CURDIR)/debian/tmp/etc/xdg/menus/applications-merged cp -f $(CURDIR)/debian/wine.menu $(CURDIR)/debian/tmp/etc/xdg/menus/applications-merged # Install application-specific desktop files mkdir -p $(CURDIR)/debian/tmp/usr/share/applications cp -f $(CURDIR)/debian/wine-uninstaller.desktop $(CURDIR)/debian/tmp/usr/share/applications/ cp -f $(CURDIR)/debian/wine-notepad.desktop $(CURDIR)/debian/tmp/usr/share/applications/ cp -f $(CURDIR)/debian/wine-browsedrive.desktop $(CURDIR)/debian/tmp/usr/share/applications/ cp -f $(CURDIR)/debian/wine-winecfg.desktop $(CURDIR)/debian/tmp/usr/share/applications/ mkdir -p $(CURDIR)/debian/tmp/usr/share/desktop-directories/ cp -f $(CURDIR)/debian/wine-wine.directory $(CURDIR)/debian/tmp/usr/share/desktop-directories/ cp -f $(CURDIR)/debian/wine-Programs.directory $(CURDIR)/debian/tmp/usr/share/desktop-directories/ cp -f $(CURDIR)/debian/wine-Programs-Accessories.directory $(CURDIR)/debian/tmp/usr/share/desktop-directories/ # Drop MIME-sensing .desktop file: execution must use binfmt-support # Re-enabled for usability purposes # rm -f $(CURDIR)/debian/tmp/usr/share/applications/wine.desktop # Install icons # These should be moved upstream, but we can't do that in time for Gutsy mkdir -p $(CURDIR)/debian/tmp/usr/share/pixmaps cp -f $(CURDIR)/debian/wine.svg $(CURDIR)/debian/tmp/usr/share/pixmaps cp -f $(CURDIR)/debian/wine-uninstaller.svg $(CURDIR)/debian/tmp/usr/share/pixmaps cp -f $(CURDIR)/debian/wine-notepad.svg $(CURDIR)/debian/tmp/usr/share/pixmaps cp -f $(CURDIR)/debian/wine-winefile.svg $(CURDIR)/debian/tmp/usr/share/pixmaps cp -f $(CURDIR)/debian/wine-winecfg.svg $(CURDIR)/debian/tmp/usr/share/pixmaps # Set up binfmt-support file mkdir -p $(CURDIR)/debian/tmp/usr/share/binfmts cp $(CURDIR)/debian/wine.binfmt $(CURDIR)/debian/tmp/usr/share/binfmts/wine # Set up wineserver restart notificition mkdir -p $(CURDIR)/debian/tmp/usr/share/wine/ cp -f $(CURDIR)/debian/wineserver-restart-required.update-notifier $(CURDIR)/debian/tmp/usr/share/wine/ # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs -a ChangeLog dh_installdocs -a dh_installexamples dh_install --fail-missing --sourcedir=debian/tmp dh_installmime dh_installman dh_link # Fix FTBFS in buildds... -dh_strip dh_compress dh_fixperms dh_iconcache dh_makeshlibs dh_installdeb ifeq ($(DEB_BUILD_ARCH), amd64) dh_shlibdeps -L wine -l debian/wine/usr/lib32 else dh_shlibdeps -L wine -l debian/wine/usr/lib endif dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install