This file is indexed.

/usr/bin/dh_gnustep is in gnustep-make 2.6.1-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#!/usr/bin/perl -w

=head1 NAME

dh_gnustep - moves files in the GNUstep hierarchy to FHS-compliant locations

=cut

use strict;
use File::Path;
use Debian::Debhelper::Dh_Lib;

=head1 SYNOPSIS

B<dh_gnustep> [S<I<debhelper options>>]

=head1 DESCRIPTION

dh_gnustep is a program based on debhelper that is responsible for doing
GNUstep-specific modifications, such as moving files in the GNUstop hierarchy
within the System domain, rooted at /usr/lib/GNUstep/System, to Filesystem
Hierarchy Standard (FHS)-compliant locations.

dh_gnustep makes the following changes:

=over 4

=item GNUstep dependencies:

Adds any extra dependencies needed for GNUstep.  Currently, the only dependency
added is to ensure that the package uses the same filesystem layout as the
other GNUstep packages installed on the system.

=item arch-indep directories:

Moves architecture-independent directories to /usr/share/GNUstep.

=item library resources:

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

=item frameworks:

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

=back

=head1 OPTIONS

dh_gnustep accepts the common debhelper options.

If the DEB_GNUSTEP_NO_MOVE environment variable is set to a non-empty, non-zero
value, then dh_gnustep exits without doing anything.

=head1 BUGS

Should implement B<-X> option.

Should do something with resources in .app bundles.

Should remove library_paths.openapp and stamp.make files.

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.

=head1 CONFORMS TO

Debian policy, version 3.6.2

FHS, version 2.3

=cut

exit 0 if ($ENV{DEB_GNUSTEP_NO_MOVE});

init();

my $LIB_ROOT = '/usr/lib/GNUstep';
my $SHARE_ROOT = 'usr/share/GNUstep';
my $INCLUDE_ROOT = 'usr/include/GNUstep';

my @ARCH_INDEP_DIRS = qw(Colors DocTemplates Fonts KeyBindings PostScript Libraries);

foreach my $package (@{$dh{DOPACKAGES}}) {
	my $tmp=tmpdir($package);

	# make each package depend on the GNUstep filesystem layout that it was
	# built with
	addsubstvar($package, "gnustep:Depends", "gnustep-fslayout-fhs");

	# move arch-indep directories to usr/share/GNUstep
	foreach my $directory (@ARCH_INDEP_DIRS) {
		if (-d "$tmp/$LIB_ROOT/$directory") {
			mkpath "$tmp/$SHARE_ROOT/$directory";
			rename "$tmp/$LIB_ROOT/$directory", "$tmp/$SHARE_ROOT/$directory";
		}
	}

	if (-d "$tmp/$LIB_ROOT/DTDs") {
		mkpath "$tmp/usr/share/xml/gnustep";
		rename "$tmp/$LIB_ROOT/DTDs", "$tmp/usr/share/xml/gnustep"
	}

	if (-d "$tmp/$LIB_ROOT/Images") {
		mkpath "$tmp/usr/share/pixmaps/GNUstep";
		rename "$tmp/$LIB_ROOT/Images", "$tmp/usr/share/pixmaps/GNUstep"
	}

	if (-d "$tmp/$LIB_ROOT/Sounds") {
		mkpath "$tmp/usr/share/sounds/GNUstep";
		rename "$tmp/$LIB_ROOT/Sounds", "$tmp/usr/share/sounds/GNUstep"
	}

	# move library resources to usr/share/GNUstep/Libraries
	if (-d "$tmp/$LIB_ROOT/Libraries/Resources") {
		mkpath "$tmp/$SHARE_ROOT/Libraries";
		rename "$tmp/$LIB_ROOT/Libraries/Resources", "$tmp/$SHARE_ROOT/Libraries";
	}

	# find frameworks and move resources and headers
	if (-d "$tmp/$LIB_ROOT/Frameworks") {
		opendir FRAMEWORKDIR, "$tmp/$LIB_ROOT/Frameworks";
		my @frameworks = grep !/^\./, readdir FRAMEWORKDIR;
		closedir FRAMEWORKDIR;
		foreach my $framework (@frameworks) {
			my $fwdir = "$tmp/$LIB_ROOT/Frameworks/$framework";
			opendir CURFWDIR, "$fwdir/Versions";
			my @versions = grep !/^(\.|Current$)/, readdir CURFWDIR;
			closedir CURFWDIR;
			foreach my $version (@versions) {
				if (-d "$fwdir/Versions/$version/Headers") {
					mkpath "$tmp/$INCLUDE_ROOT/Frameworks/$framework/Versions/$version";
					rename "$tmp/$LIB_ROOT/Frameworks/$framework/Versions/$version/Headers", "$tmp/usr/include/GNUstep/Frameworks/$framework/Versions/$version";
					symlink "../../../../../../include/GNUstep/Frameworks/$framework/Versions/$version", "$tmp/$LIB_ROOT/Frameworks/$framework/Versions/$version/Headers";
				}
				if (-d "$fwdir/Versions/$version/Resources") {
					mkpath "$tmp/$SHARE_ROOT/Frameworks/$framework/Versions/$version";
					rename "$tmp/$LIB_ROOT/Frameworks/$framework/Versions/$version/Resources", "$tmp/usr/share/GNUstep/Frameworks/$framework/Versions/$version";
					symlink "../../../../../../share/GNUstep/Frameworks/$framework/Versions/$version", "$tmp/$LIB_ROOT/Frameworks/$framework/Versions/$version/Resources";
				}
			}
			if (-l "$fwdir/Headers") {
				my $linkend = readlink "$fwdir/Versions/Current";
				symlink "Versions/$linkend", "$tmp/$INCLUDE_ROOT/Frameworks/$framework/Headers";
			}
			if (-l "$fwdir/Resources") {
				my $linkend = readlink "$fwdir/Versions/Current";
				symlink "Versions/$linkend", "$tmp/$SHARE_ROOT/Frameworks/$framework/Resources";
			}
		}
	}
}

=head1 SEE ALSO

L<debhelper(7)>

This program is not part of debhelper.

=head1 AUTHOR

Hubert Chan <uhoreg@debian.org>

=cut