File: dh_user-session-migration

package info (click to toggle)
user-session-migration 0.4.3%2Bnmu1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 196 kB
  • sloc: ansic: 290; python: 228; perl: 27; makefile: 11; sh: 6
file content (84 lines) | stat: -rwxr-xr-x 2,072 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/perl -w

=head1 NAME

dh_user-session-migration - install user session migration files into package build directories

=cut

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

=head1 SYNOPSIS

B<dh_migrations> [S<B<debhelper options>>] [B<-n>]

=head1 DESCRIPTION

B<dh_user-session-migrationis> is a debhelper program that is responsible for
installing B<user session migration> files used by the user-session-migration helper
into package build directories and add a dependency of the package on
user-session-migration.

This helper will add in ${misc:Depends} the user-session-migration tool as a dependency of the
targeted package.

Use the --with user-session-migration sequence for debhelper 8+.
Or add dh-sequence-user-session-migration to the package's Build-Depends list.

=head1 FILES

=over 4

=item debian/I<package>.user-session-migration

List the files and migration scripts to install into each package. The format is a set of lines,
where each line lists a script file to install into into usr/share/user-session-migration/scripts
in the package build directory.

The name of the files (or directories) to install should be given relative to the current directory.

=back

=head1 OPTIONS

=cut

init();

foreach my $package (@{$dh{DOPACKAGES}}) {
	my $tmp=tmpdir($package);
	my $file=pkgfile($package,"user-session-migration");
	my @scripts;

	@scripts=filearray($file, ".") if $file;

	if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
		push @scripts, @ARGV;
	}

	foreach my $script (@scripts) {
		if (! -d "$tmp/usr/share/user-session-migration/scripts") {
			doit("install","-d","$tmp/usr/share/user-session-migration/scripts");
		}
		doit("install","-p","-m755",$script,"$tmp/usr/share/user-session-migration/scripts");
	}

    if (@scripts) {
		addsubstvar($package, "misc:Depends", "user-session-migration");
	}
}

=head1 SEE ALSO

L<debhelper(7)>
L<user-session-migration(1)>

=head1 AUTHOR

Didier Roche <didrocks@ubuntu.com>

Copyright (C) 2012 Canonical Ltd., licensed under the GNU LGPL v3 or later.

=cut