Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 155 lines (121 sloc) 4.256 kb
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97f1-...
alobbs authored
1 #
2 # spec file for package SUNWcherokee
3 #
9ba6eaf @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1131 5dc97367-97f1...
alobbs authored
4 # Copyright (c) 2008 Sun Microsystems, Inc.
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97f1-...
alobbs authored
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
7 #
8
9 %include Solaris.inc
10
11 Name: SUNWcherokee
12 Summary: cherokee - Fast, flexible, lightweight web server
13 Version: 0.5.0
e8c75f5 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@438 5dc97367-97f1-...
alobbs authored
14 Source: http://www.cherokee-project.com/download/0.5/%{version}/cherokee-%{version}.tar.gz
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97f1-...
alobbs authored
15 SUNW_BaseDir: %{_basedir}
16 BuildRoot: %{_tmppath}/%{name}-%{version}-build
17
18 %include default-depend.inc
19 #BuildRequires: SUNWgnome-base-libs-share
20
21 %package root
22 Summary: cherokee - Fast, flexible, lightweight web server - platform dependent files, / filesystem
23 SUNW_BaseDir: /
24 %include default-depend.inc
25
26 %package devel
27 Summary: cherokee - Fast, flexible, lightweight web server - developer files
28 SUNW_BaseDir: %{_basedir}
29 %include default-depend.inc
30 Requires: SUNWcherokee
31
32 %prep
33 %setup -q -n cherokee-%version
34
35 %build
36 #export PKG_CONFIG_PATH=%{_pkg_config_path}
37 #export MSGFMT="/usr/bin/msgfmt"
38 export CFLAGS="%optflags -I%{_includedir}"
39 export RPM_OPT_FLAGS="$CFLAGS"
40 export LDFLAGS="%_ldflags"
41
42 ./configure --prefix=%{_prefix} \
43 --enable-os-string="OpenSolaris" \
44 --enable-pthreads \
45 --libexecdir=%{_libexecdir} \
46 --datadir=%{_datadir} \
47 --mandir=%{_mandir} \
48 --infodir=%{_infodir} \
49 --sysconfdir=%{_sysconfdir} \
50 --localstatedir=%{_localstatedir} \
51 --with-wwwroot=%{_localstatedir}/cherokee
52 make -j$CPUS
53
54 %install
55 make install DESTDIR=$RPM_BUILD_ROOT
56
57 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a
58 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
59 rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.a
60 rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
61
62 mkdir -p ${RPM_BUILD_ROOT}/var/svc/manifest/network/
63 cp http-cherokee.xml ${RPM_BUILD_ROOT}/var/svc/manifest/network/http-cherokee.xml
64
65 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
66
67
68
69 %post -n SUNWcherokee-root
70
71 if [ -f /lib/svc/share/smf_include.sh ] ; then
72 . /lib/svc/share/smf_include.sh
73 smf_present
74 if [ $? -eq 0 ]; then
75 /usr/sbin/svccfg import /var/svc/manifest/network/http-cherokee.xml
76 fi
77 fi
78
79 exit 0
80
81 %preun -n SUNWcherokee-root
82 if [ -f /lib/svc/share/smf_include.sh ] ; then
83 . /lib/svc/share/smf_include.sh
84 smf_present
85 if [ $? -eq 0 ]; then
86 if [ `svcs -H -o STATE svc:/network/http:cherokee` != "disabled" ]; then
87 svcadm disable svc:/network/http:cherokee
88 fi
89 fi
90 fi
91
92
93 %postun -n SUNWcherokee-root
94
95 if [ -f /lib/svc/share/smf_include.sh ] ; then
96 . /lib/svc/share/smf_include.sh
97 smf_present
98 if [ $? -eq 0 ] ; then
99 /usr/sbin/svccfg export svc:/network/http > /dev/null 2>&1
100 if [ $? -eq 0 ] ; then
101 /usr/sbin/svccfg delete -f svc:/network/http:cherokee
102 fi
103 fi
104 fi
105
106 exit 0
107
108
109
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %files
115 %defattr (-, root, other)
116 %dir %attr (0755, root, bin) %{_bindir}
117 %{_bindir}/*
118 %dir %attr (0755, root, bin) %{_sbindir}
119 %{_sbindir}/cherokee
120 %dir %attr (0755, root, bin) %{_libdir}
121 %{_libdir}/lib*.so*
122 %{_libdir}/cherokee
123 %dir %attr (0755, root, sys) %{_datadir}
124 %dir %attr(0755, root, bin) %{_mandir}
125 %dir %attr(0755, root, bin) %{_mandir}/man1
126 %{_mandir}/man1/*
127 %{_datadir}/aclocal
128 %{_datadir}/cherokee
129 %{_datadir}/doc
130
131
132 %files root
133 %defattr (-, root, other)
134 %attr (0755, root, sys) %dir %{_sysconfdir}
135 %{_sysconfdir}/*
136 %dir %attr (0755, root, sys) %{_localstatedir}
137 %{_localstatedir}/cherokee/*
138 %defattr (0755, root, sys)
139 %attr(0444, root, sys)/var/svc/manifest/network/http-cherokee.xml
140
141 %files devel
142 %dir %attr (0755, root, bin) %dir %{_libdir}
143 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
144 %{_libdir}/pkgconfig/*
145 %dir %attr (0755, root, bin) %{_includedir}
146 %{_includedir}/*
147
148
149 %changelog
150 * Wed Jan 25 2006 - rodrigo.fernandez-vizarra@sun.com
151 - Added SMF definition file install/removal
152
153 * Tue Jan 17 2006 - damien.carbery@sun.com
154 - Created.
Something went wrong with that request. Please try again.