]> git.proxmox.com Git - mirror_frr.git/blame - solaris/Makefile.am
[solaris] Add licence boilerplate to files for clarity
[mirror_frr.git] / solaris / Makefile.am
CommitLineData
1b414a17 1# Solaris packages automake file
e24f0638 2# $Id: Makefile.am,v 1.7 2006/02/19 18:59:26 paul Exp $
1b414a17 3
4.PHONY: packages
5
6# the names of the various subpackages, and some convenient
7# derived variables.
65c1cafd 8pkg_names = daemons dev doc libs smf
1b414a17 9pkg_quagga_daemons = zebra bgpd ospfd ospf6d ripd ripngd
10pkg_name_rev = @PACKAGE_VERSION@-@CONFDATE@-@target_os@-@target_cpu@
11pkg_depends := $(pkg_names:%=depend.%)
12pkg_packages := $(pkg_names:%=@PACKAGE_TARNAME@-%-$(pkg_name_rev).pkg)
13pkg_pkginfos := $(pkg_names:%=pkginfo.%.full)
14pkg_prototypes := $(pkg_names:%=prototype.%)
2e7d9eba 15pkg_manifests := quagga.xml
1b414a17 16
17# pkgmk variable substitutions wont grok ${variable} in prototype
18# file, so we cant let autoconf generate the file sadly
19# wish automake would just provide a template for this
20edit := $(SED) \
21 -e 's,@prefix\@,$(prefix),g' \
22 -e 's,@exec_prefix,$(exec_prefix),g' \
23 -e 's,@bindir\@,$(bindir),g' \
24 -e 's,@sbindir\@,$(sbindir),g' \
25 -e 's,@libexecdir\@,$(libexecdir),g' \
26 -e 's,@datadir\@,$(datadir),g' \
27 -e 's,@sysconfdir\@,$(sysconfdir),g' \
28 -e 's,@sharedstatedir\@,$(sharedstatedir),g' \
29 -e 's,@localstatedir\@,$(localstatedir),g' \
30 -e 's,@libdir\@,$(libdir),g' \
31 -e 's,@includedir\@,$(includedir),g' \
32 -e 's,@infodir\@,$(infodir),g' \
33 -e 's,@mandir\@,$(mandir),g' \
34 -e 's,@enable_user\@,$(enable_user),g' \
35 -e 's,@enable_group\@,$(enable_group),g' \
36 -e 's,@enable_vty_group\@,$(enable_vty_group),g' \
37 -e 's,@quagga_statedir\@,$(quagga_statedir),g' \
38 -e 's,[@]PACKAGE_NAME[@],@PACKAGE_NAME@,g' \
39 -e 's,[@]PACKAGE_TARNAME[@],@PACKAGE_TARNAME@,g' \
40 -e 's,[@]PACKAGE_VERSION[@],@PACKAGE_VERSION@,g' \
41 -e 's,[@]PACKAGE_BUGREPORT[@],@PACKAGE_BUGREPORT@,g' \
42 -e 's,[@]CONFDATE[@],@CONFDATE@,g' \
43 -e 's,[@]target_cpu[@],$(target_cpu),g' \
44 -e 's,[@]target_host[@],$(target_host),g' \
45 -e 's,[@]target_os[@],$(target_os),g'
46
47# common options for pkgmk
48pkg_make_vars := exec_prefix=@exec_prefix@ prefix=@prefix@ \
49 builddir=@builddir@ srcdir=@srcdir@ \
50 top_builddir=@top_builddir@ top_srcdir=@top_srcdir@ \
51 abs_builddir=@abs_builddir@ abs_srcdir=@abs_srcdir@ \
52 abs_top_builddir=@abs_top_builddir@ abs_top_srcdir=@abs_top_srcdir@
53
54# pkgmk: write the package to spool in build dir, to avoid root dependencies
55pkg_make = pkgmk -o -d @abs_builddir@ \
56 -f $< DESTDIR="$(DESTDIR)/" $(pkg_make_vars)
57
58# pkgtrans: write a pkg file stream, shame we cant pipe directly to it from
59# pkgmk..
60pkg_trans = pkgtrans -s @abs_builddir@ "@abs_builddir@/$@"
61
62# pkgmk can only cope with a single pkginfo, cant 'stack' various
63# pkginfo template files and a package specific pkginfo file in the prototype
64# Create the package specific template here, and create the full pkginfo
65# by cating this and the common pkginfo.tmpl together.
66pkginfo.tmpl: $(srcdir)/pkginfo.tmpl.in Makefile
67 rm -f $@
68 $(edit) $< > $@
69
70pkginfo.%.tmpl: $(srcdir)/pkginfo.%.tmpl.in Makefile
71 rm -f $@
72 $(edit) $< > $@
73
f3ff1554 74pkginfo.%.full: pkginfo.%.tmpl pkginfo.tmpl Makefile
1b414a17 75 cat pkginfo.tmpl pkginfo.$*.tmpl > $@
76
77# use 'edit' above to transform prototype.in to pkgmk acceptable prototype
78prototype.%: $(srcdir)/prototype.%.in Makefile
79 rm -f $@
80 $(edit) $< > $@
81
82# use edit to construct the SMF manifest files
83%.xml: $(srcdir)/%.xml.in Makefile
84 rm -f $@
85 $(edit) $< > $@
e24f0638
PJ
86# use edit to construct the depend files
87depend.%: $(srcdir)/depend.%.in Makefile
88 rm -f $@
89 $(edit) $< > $@
1b414a17 90
91# method file (bit like init script)
92quagga.init: $(srcdir)/quagga.init.in Makefile
93 rm -f $@
94 $(edit) $< > $@
95
96# construct the pkg
97@PACKAGE_TARNAME@-%-$(pkg_name_rev).pkg: prototype.% \
d98b74b5 98 quagga.init pkginfo.%.full
1b414a17 99 ($(pkg_make) && \
100 $(pkg_trans) "QUAGGA$*")
101
1b414a17 102%.pkg.gz : %.pkg
103 (gzip -c $< > $@)
104
105# pkginfo.package and prototype.package are all built sources
106#BUILT_SOURCES = pkginfo.daemons pkginfo.dev pkginfo.doc pkginfo.libs \
107# prototype.daemons prototype.dev prototype.doc prototype.libs
108BUILT_SOURCES = $(pkg_pkginfos) pkginfo.tmpl $(pkg_prototypes) \
e24f0638 109 $(pkg_manifests) $(pkg_depends) quagga.init
1b414a17 110
111CLEANFILES := $(BUILT_SOURCES) $(pkg_packages)
112
e24f0638 113EXTRA_DIST := $(pkg_manifests:%=%.in) $(pkg_prototypes:%=%.in) \
1b414a17 114 $(pkg_names:%=pkginfo.%.tmpl.in) $(srcdir)/pkginfo.tmpl.in \
e24f0638 115 $(pkg_depends:%=%.in) quagga.init.in README.txt
1b414a17 116
117pkg-root-install:
118 (cd $(top_builddir) && \
119 $(MAKE) DESTDIR=$(abs_builddir)/quagga-root install)
120
121packages: $(pkg_packages)
122
123#nodist_pkgdata_DATA = $(pkg_packages)