DH_GNUSTEP(1)

NAME
dh_gnustep - perform GNUstep-specific actions for Debian GNUstep packages

SYNOPSIS
dh_gnustep [debhelper options] [--app] [--appsupport] [--bug-script] [--game] [--move-to=package] [--no-cleanup] [--no-move]

DESCRIPTION
dh_gnustep is a program based on debhelper that is responsible for doing GNUstep-specific modifications, such as moving files in the GNUstep hierarchy within the System domain, rooted at /usr/lib/GNUstep, to Filesystem Hierarchy Standard (FHS)-compliant locations. It also adds bug-script symlinks for GNUstep applications and removes some build system artifacts.

dh_gnustep must be run after dh_bugfiles(1) but before dh_link(1). Normally you would use an override_dh_link target but you should remember to invoke dh_link(1) as the last command in the recipe. This is mandatory so that the created links are made policy-compliant. Using the execute_before_dh_link target avoids this extra step. This program makes the following changes (all move operations can be cancelled with the --no-move option):

arch-indep directories:
    Moves architecture-independent directories to /usr/share.

library resources:
    Moves library resources to /usr/share/GNUstep/Libraries.

frameworks:
    Moves framework headers to /usr/include/GNUstep/Frameworks, and framework resources to /usr/share/GNUstep/Frameworks.

applications:
    Moves application resource bundles to /usr/share/GNUstep. This is not done by default and requires specifying the --app option.

application support:
    Moves application support (/usr/lib/GNUstep/ApplicationSupport) bundles' resources to /usr/share/GNUstep. This is not done by default and requires specifying the --appsupport option.

bug-script symlinks:
    By default, dh_gnustep will install a bug-script symlink for any package with a name ending with .app, pointing to /usr/share/bug/gnustep-back-common, so that the system and user GNUstep backends are reported as package-specific information to the BTS when submitting bugs. It will also add the appropriate dependency (via the ${misc:Depends} substitution variable).

    Note that dh_gnustep will not handle any other bug files and it expects dh_bugfiles(1) to have completed its job in order to handle the case when the bug-script symlink must be installed as /usr/share/bug/<package>/script (when there are bug-control or bug-presubj files). If an existing bug script is detected, dh_gnustep will emit a warning as a package can have only one bug-script file. In such situations the only solution is to integrate the contents of /usr/share/bug/gnustep-back-common into the existing script.

build system artifacts:
    By default, dh_gnustep will delete stamp.make files which are created and (unfortunately) installed by GNUstep Make for many project types. Likewise, it will delete dependencies files created and installed for GNUstep documentation projects. The number and type of the deleted files are recorded in the build log if DH_QUIET is not set.

OPTIONS
dh_gnustep accepts the common debhelper options, and some specific ones. If you use any of the options below, make sure to build-depend on gnustep-make (>= 2.9.2-2) if that version is not already satisfied in the current stable/oldstable release.

--app
    Move the resource bundle of a GNUstep application (/usr/lib/GNUstep/Applications/Foo.app/Resources on Debian systems) to /usr/share/GNUstep/Foo.app and make the necessary symlink. The automatically generated .desktop file is deleted. If the binary package contains more than one app, they are processed independently.

    Care shhould be taken when using this option because some apps contain architecture-dependent files in their resource bundle. Another important point to pay attention to: if this is an existing package which does not have its resources moved to /usr/share, a maintscript is required because dpkg will not switch a directory to a symlink (and vice-versa). dh_gnustep does not handle this, see dpkg-maintscript-helper(1).

    This option is incompatible with --no-move and for multi-binary packages should be used with the appropriate -p option.

--appsupport
    Move the Resources directories of all bundles found in /usr/lib/GNUstep/ApplicationSupport to /usr/share, as subdirectories to the parent directory. If the package ships several bundles under /usr/lib/GNUstep/ApplicationSupport/Palettes, they are moved as subdirectories to /usr/share/GNUstep/Palettes.

    Note that bundles' resources sometimes contain architecture-dependent files in which case the best approach is to move the architecture-independent files manually.

    This option was introduced in gnustep-make/2.9.2-3 and like --app it is incompatible with --no-move.

--bug-script
    Install bug-script symlink for the package even if its name does not end with .app. Typically this should be done for apps which are installed for some reason with tools or other stuff in a package with a different name (such as gnustep-examples or gnustep-dl2). It can also be done for GUI bundles, themes, palettes, etc. You probably want to use the -p option as well, otherwise dh_gnustep will add bug script symlinks for all binary packages.

--game
    This option must be used together with --app. It does everything that --app does as described above, and additionally moves the symlink to the executable from /usr/bin to /usr/games. If /usr/bin is found empty afterwards, the directory is deleted.

--move-to=package
    This option must be used together with --app or --appsupport (or both). If --app is specified, move the resource bundle of an application to another architecture-independent package. If --appsupport is given, move the Resources directories of all bundles found in /usr/lib/GNUstep/ApplicationSupport to /usr/share/GNUstep in the specified package. If both --app and --appsupport are specified, all resource bundles are moved to the package specified by the option's argument, there is no way to split them in different packages. The current implementation will handle more than one app per binary package but it will fail with a multi-binary source package containing more than one .app binary package. Likewise, if the package contains more than one ApplicationSupport directory, they will be processed independently as expected but the build is likely to fail if they are in different binary packages.

    Use with caution; see the EXAMPLES section for a working example.

--no-cleanup
    Do not delete stamp.make and dependencies files.

--no-move
    Do not perform any move operations. Setting the DEB_GNUSTEP_NO_MOVE environment variable to a non-empty, non-zero value has the same effect.

EXAMPLES
  execute_before_dh_link:
          dh_gnustep -pgnustep-dl2 --no-move --bug-script
          dh_gnustep --remaining-packages

Do not move any files for the gnustep-dl2 package (as that's already handled manually) but install a bug-script symlink because the package contains an application and a Gorm palette.

  execute_before_dh_link:
  ifeq (,$(filter lynkeos.app-common,$(shell dh_listpackages)))
          rm -rf debian/tmp$(GNUSTEP_SYSTEM_APPS)/Lynkeos.app/Resources
          dh_gnustep
  else
          dh_gnustep --app --move-to=lynkeos.app-common
  endif

Move the lynkeos.app resource bundle to the architecture-independent package lynkeos.app-common. When doing a full build (arch:all + arch:any), the make conditional is false so the move is done when operating on lynkeos.app. During an arch:any build, no move is being done but the lynkeos.app package is processed with the the default dh_gnustep behaviour, gaining a bug-script symlink and cleaning up build artifacts. The deletion of the Resources directory is to eliminate a dh_missing(1) error. During an arch:all build the move is done while processing the lynkeos.app-common package.

  override_dh_link:
          dh_gnustep --app --game
          dh_link

Move the app's resource bundle to /usr/share and the symlink to the executable from /usr/bin to /user/games. Additionally, assuming the binary package name ends with .app, create a bug-script symlink pointing to /usr/share/bug/gnustep-back-common. Finally, delete the stamp.make file from the app bundle.

BUGS
Should implement -X option.

Doesn't really do the right thing with info files (should call install-info).

Should do something with Java classes -- make a jar file and move from Library/Libraries/Java to /usr/share/java -- to comply with Java policy.

CONFORMS TO
Debian policy, version 3.6.2

FHS, version 2.3

SEE ALSO
debhelper(7), dh_link(1), dh_bugfiles(1)

This program is not part of debhelper.

AUTHORS
Hubert Chan <uhoreg@debian.org>

Yavor Doganov <yavor@gnu.org>