1 # Solaris packages automake file
3 # XXX This file uses GNU make extensions.
5 .PHONY
: packages
all all-files
10 exec_prefix = @
exec_prefix@
13 libexecdir
= @libexecdir@
14 datarootdir
= @datarootdir@
16 sysconfdir
= @sysconfdir@
17 sharedstatedir
= @sharedstatedir@
18 localstatedir
= @localstatedir@
20 includedir = @
includedir@
23 frr_statedir
= @frr_statedir@
27 top_builddir
= @top_builddir@
28 top_srcdir
= @top_srcdir@
29 abs_builddir
= @abs_builddir@
30 abs_srcdir
= @abs_srcdir@
31 abs_top_builddir
= @abs_top_builddir@
32 abs_top_srcdir
= @abs_top_srcdir@
34 enable_user
= @enable_user@
35 enable_group
= @enable_group@
36 enable_vty_group
= @enable_vty_group@
38 PACKAGE_NAME
= @PACKAGE_NAME@
39 PACKAGE_TARNAME
= @PACKAGE_TARNAME@
40 PACKAGE_VERSION
= @PACKAGE_VERSION@
41 PACKAGE_BUGREPORT
= @PACKAGE_BUGREPORT@
50 # the names of the various subpackages, and some convenient
52 pkg_names
= daemons dev doc libs smf
53 pkg_frr_daemons
= zebra bgpd ospfd ospf6d ripd ripngd
54 pkg_name_rev
= $(PACKAGE_VERSION
)-$(CONFDATE
)-$(host_os
)-$(host_cpu
)
55 pkg_depends
= $(pkg_names
:%=depend.
%)
56 pkg_packages
= $(pkg_names
:%=@PACKAGE_TARNAME@
-%-$(pkg_name_rev
).pkg
)
57 pkg_pkginfos
= $(pkg_names
:%=pkginfo.
%.full
)
58 pkg_prototypes
= $(pkg_names
:%=prototype.
%)
59 pkg_manifests
= frr.xml
61 # pkgmk variable substitutions wont grok ${variable} in prototype
62 # file, so we cant let autoconf generate the file sadly
63 # wish automake would just provide a template for this
65 -e
's,@prefix\@,$(prefix),g' \
66 -e
's,@exec_prefix,$(exec_prefix),g' \
67 -e
's,@bindir\@,$(bindir),g' \
68 -e
's,@sbindir\@,$(sbindir),g' \
69 -e
's,@libexecdir\@,$(libexecdir),g' \
70 -e
's,@datadir\@,$(datadir),g' \
71 -e
's,@sysconfdir\@,$(sysconfdir),g' \
72 -e
's,@sharedstatedir\@,$(sharedstatedir),g' \
73 -e
's,@localstatedir\@,$(localstatedir),g' \
74 -e
's,@libdir\@,$(libdir),g' \
75 -e
's,@includedir\@,$(includedir),g' \
76 -e
's,@infodir\@,$(infodir),g' \
77 -e
's,@mandir\@,$(mandir),g' \
78 -e
's,@enable_user\@,$(enable_user),g' \
79 -e
's,@enable_group\@,$(enable_group),g' \
80 -e
's,@enable_vty_group\@,$(enable_vty_group),g' \
81 -e
's,@frr_statedir\@,$(frr_statedir),g' \
82 -e
's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \
83 -e
's,[@]PACKAGE_TARNAME[@],$(PACKAGE_TARNAME),g' \
84 -e
's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
85 -e
's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
86 -e
's,[@]CONFDATE[@],$(CONFDATE),g' \
87 -e
's,[@]host_cpu[@],$(host_cpu),g' \
88 -e
's,[@]host_os[@],$(host_os),g'
90 # common options for pkgmk
91 pkg_make_vars
= exec_prefix=$(exec_prefix) prefix=$(prefix) \
92 builddir
=$(builddir
) srcdir=$(srcdir) \
93 top_builddir
=$(top_builddir
) top_srcdir
=$(top_srcdir
) \
94 abs_builddir
=$(abs_builddir
) abs_srcdir
=$(abs_srcdir
) \
95 abs_top_builddir
=$(abs_top_builddir
) abs_top_srcdir
=$(abs_top_srcdir
)
97 # pkgmk: write the package to spool in build dir, to avoid root dependencies
98 pkg_make
= pkgmk
-o
-d
$(abs_builddir
) \
99 -f
$< DESTDIR
="$(DESTDIR)/" $(pkg_make_vars
)
101 # pkgtrans: write a pkg file stream, shame we cant pipe directly to it from
103 pkg_trans
= pkgtrans
-s
$(abs_builddir
) "$(abs_builddir)/$@"
105 # pkgmk can only cope with a single pkginfo, cant 'stack' various
106 # pkginfo template files and a package specific pkginfo file in the prototype
107 # Create the package specific template here, and create the full pkginfo
108 # by cating this and the common pkginfo.tmpl together.
109 pkginfo.tmpl
: $(srcdir)/pkginfo.tmpl.in Makefile
113 pkginfo.
%.tmpl
: $(srcdir)/pkginfo.
%.tmpl.in Makefile
117 pkginfo.
%.full
: pkginfo.
%.tmpl pkginfo.tmpl Makefile
118 cat pkginfo.tmpl pkginfo.
$*.tmpl
> $@
120 # use 'edit' above to transform prototype.in to pkgmk acceptable prototype
121 prototype.
%: $(srcdir)/prototype.
%.in Makefile
125 # use edit to construct the SMF manifest files
126 %.xml
: $(srcdir)/%.xml.in Makefile
129 # use edit to construct the depend files
130 depend.
%: $(srcdir)/depend.
%.in Makefile
134 # method file (bit like init script)
135 frr.init
: $(srcdir)/frr.init.in Makefile
140 $(PACKAGE_TARNAME
)-%-$(pkg_name_rev
).pkg
: prototype.
% \
141 depend.
% frr.init pkginfo.
%.full
143 $(pkg_trans
) "FRR$*")
149 (cd
$(top_builddir
) && \
150 $(MAKE
) DESTDIR
=$(abs_builddir
)/frr-root
install)
152 packages
: $(pkg_packages
)
154 all-files
: $(pkg_pkginfos
) pkginfo.tmpl
$(pkg_prototypes
) \
155 $(pkg_manifests
) $(pkg_depends
) frr.init