File: Makefile.PL

package info (click to toggle)
libgtk3-imageview-perl 6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 176 kB
  • sloc: perl: 995; makefile: 4
file content (82 lines) | stat: -rw-r--r-- 2,332 bytes parent folder | download
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
use ExtUtils::MakeMaker;

my $path = 'lib/Gtk3/ImageView.pm';
my $year = (localtime)[5] + 1900;

# Slurp the program source and dig out the version number.
my $text    = do { local ( @ARGV, $/ ) = $path; <> };
my $version = $2 if ( $text =~ /^(my|our) \$VERSION\s*=\s*'?([^;]*)'?/m );

WriteMakefile(
    NAME      => 'Gtk3::ImageView',
    VERSION   => $version,
    PREREQ_PM => {
        Glib     => 1.210,
        Gtk3     => 0,
        Readonly => 0,
    },
    TEST_REQUIRES => {
        Test::More        => 0,
        Test::Differences => 0,
        Image::Magick     => 0,
        Try::Tiny         => 0,
        Test::MockObject  => 0,
        Carp::Always      => 0,
    },
    META_MERGE => {
        'meta-spec' => { version => 2 },
        resources   => {
            repository => {
                type => 'git',
                url  => 'https://github.com/carygravel/gtk3-imageview.git',
                web  => 'https://github.com/carygravel/gtk3-imageview',
            },
        },
    },
    clean => { FILES => '$(SOURCE_TIDY)' },
    (
        $] >= 5.005
        ?    ## Add these new keywords supported since 5.005
          (
            ABSTRACT_FROM => $path,    # retrieve abstract from module
            AUTHOR        => [
                'Jeffrey Ratcliffe <jffry@posteo.net>',
                'Alexey Sokolov <sokolov@google.com>',
            ]
          )
        : ()
    ),
);

sub MY::postamble {
    my $postamble = <<'END';
SHELL = bash
NAME = Gtk3-ImageView
MANIFEST = $(shell cat MANIFEST)
SOURCE = $(filter %.pm %.PL %.pl %.t,$(MANIFEST))
SOURCE_TIDY = $(foreach file,$(SOURCE),$(file).tdy)

htdocs/index.html : lib/Gtk3/ImageView.pm
	[ -d htdocs ] || mkdir htdocs
	pod2html --noindex --title=$(NAME)-$(VERSION) $* > $@

remote-html : htdocs/index.html
	scp htdocs/index.html ra28145,$(NAME)@web.sf.net:/home/groups/g/gs/$(NAME)/htdocs/

signed_tardist : tardist
	gpg --armor --detach-sign $(NAME)-$(VERSION).tar.gz

file_releases : signed_tardist
	scp $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION).tar.gz.asc $< \
	  ra28145,$(NAME)@frs.sf.net:/home/frs/project/g/gs/$(NAME)/$(NAME)/$(VERSION)/

MANIFEST : $(SOURCE)
	git ls-files | egrep -v '^\.git' > $@

tidy : MANIFEST $(SOURCE_TIDY)

%.tdy : %
	perltidy $* && if ! diff -q $@ $* > /dev/null; then cp $@ $*; fi
END
    $postamble;
}