> # > # spec file for package nwam-manager > # > # Copyright (c) 2007 Sun Microsystems, Inc.
2008, no (c) > # This file and all modifications and additions to the pristine > # package are under the same license as the package itself. > # > # Owner: Darren, Lin This should be one opensolaris user name. > %include l10n.inc > Name: nwam-manager > License: CDDL > Group: System/GUI/GNOME > Version: 0.5.0 > Release: 0.5.0 We don't use the Release field, but 0.5.0 is clearly wrong, should be 1 in the initial spec file, but you can also delete it. > Distribution: Java Desktop System > Vendor: Sun Microsystems, Inc. You can delete these, they are set in Solaris.inc > Summary: Network Auto-Magic > Source: > http://src.opensolaris.org/source/raw/jds/nwam-manager/branches/phase-0.5/tarballs/%{name}-%{version}.tar.gz > #Source1: %{name}-po-sun-%{po_sun_version}.tar.bz2 Will the l10n bits be added later? > URL: http://www.opensolaris.org A link pointing directly to NWAM would be nicer. > BuildRoot: %{_tmppath}/%{name}-%{version}-build > Docdir: %{_defaultdocdir}/%{name} > Autoreqprov: on > > %define libgnomeui_version 2.1.5 > %define glib_version 2.6.0 > %define gconf_version 2.6.0 > %define libglade_version 2.6.0 > %define gtk_version 2.6.0 > %define libnotify_version 0.3.0 > > Requires: libgnomeui >= %{libgnomeui_version} > Requires: glib >= %{glib_version} > Requires: gconf >= %{gconf_version} > Requires: libglade >= %{libglade_version} > Requires: gtk >= %{gtk_version} > Requires: libnotify >= %{libnotify_version} > BuildRequires: libgnomeui-devel >= %{libgnomeui_version} > BuildRequires: glib >= %{glib_version} > BuildRequires: gconf >= %{gconf_version} > BuildRequires: libglade >= %{libglade_version} > BuildRequires: gtk >= %{gtk_version} > BuildRequires: libnotify >= %{libnotify_version} > > %description > Nwam-manager is a GUI of Nwam > http://www.opensolaris.org/os/project/nwam > > %prep > %setup -q > %if %build_l10n > %endif Should be deleted? > %build > %ifos linux > if [ -x /usr/bin/getconf ]; then > CPUS=`getconf _NPROCESSORS_ONLN` > fi > %else > CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` > %endif > if test "x$CPUS" = "x" -o $CPUS = 0; then > CPUS=1 > fi > > libtoolize --force > intltoolize --force --copy --automake > aclocal $ACLOCAL_FLAGS > autoheader > automake -a -c -f > autoconf > > export PKG_CONFIG_PATH="%{_libdir}/pkgconfig:%{_datadir}/pkgconfig" > CFLAGS="$RPM_OPT_FLAGS" \ > ./configure \ > --prefix=%{_prefix} \ > --sysconfdir=%{_sysconfdir} \ > --libdir=%{_libdir} \ > --bindir=%{_bindir} \ > --libexecdir=%{_libexecdir} \ > --mandir=%{_mandir} \ > --localstatedir=/var/lib > > #error when parallel make > #make -j $CPUS It would be nice to find the missing dependencies in the Makefiles. > make > > %install > export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 > make install DESTDIR=$RPM_BUILD_ROOT > unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL > > %clean > rm -rf $RPM_BUILD_ROOT > > %files > %defattr (-, root, root) > %{_bindir}/* > %{_sysconfdir}/gconf/schemas > %{_libdir}/* > %{_libexecdir}/* > %{_datadir}/applications > %{_datadir}/gnome/help/nwam/* > %{_datadir}/locale/*/LC_MESSAGES/*.mo > %{_datadir}/omf/nwam/* > %{_datadir}/pixmaps/* > %{_datadir}/nwam/* > %{_mandir}/man1/nwam* > %{_includedir}/nwam/* > > %changelog > * Wed Aug 01 2007 - lin.ma at sun.com > - Initial > > > > > > > > plain text > document > attachment > (SUNWnwam-manager.spec) > > # > # spec file for package SUNWnwam-manager > # > # includes module(s): nwam-manager > # > # Copyright (c) 2008 Sun Microsystems, Inc. > # This file and all modifications and additions to the pristine > # package are under the same license as the package itself. > # > # Owner: Darren, Lin Same comment for the owner as in the base spec. > %include Solaris.inc > > %use nwam_manager = nwam-manager.spec > > Name: SUNWnwam-manager > Summary: Nwam This becomes the one-line description of the package which is displayed by pkginfo and shown in the package manager so please put something more descriptive here. > Version: %{default_pkg_version} > Source: %{name}-manpages-0.1.tar.gz > SUNW_BaseDir: %{_prefix} > SUNW_Copyright: %{name}.copyright > BuildRoot: %{_tmppath}/%{name}-%{version}-build > > %include default-depend.inc > BuildRequires: SUNWgnome-libs-devel > # Disable these until NWAM 0.5 integrated into OpenSolaris > # BuildRequires: SUNWnwamintu > # BuildRequires: SUNWnwamintr > BuildRequires: SUNWcslr > Requires: %{name}-root > Requires: SUNWgnome-libs > Requires: SUNWgnome-base-libs > Requires: SUNWgnome-session > Requires: SUNWcslr > > %package root > Summary: %{summary} - / filesystem > SUNW_BaseDir: / > %include default-depend.inc > > %if %build_l10n > %package l10n > Summary: %{summary} - l10n files > SUNW_BaseDir: %{_basedir} > %include default-depend.inc > Requires: %{name} > %endif > > %prep > rm -rf %name-%version > mkdir %name-%version > %nwam_manager.prep -d %name-%version > cd %{_builddir}/%name-%version > gzcat %SOURCE0 | tar xf - > > %build > export CFLAGS="%optflags" Hmm... the %build section in the base spec resets CFLAGS to $RPM_OPT_FLAGS (which is the same as %optflags). So you should only need one of these. > export LDFLAGS="%_ldflags" > export ACLOCAL_FLAGS="-I %{_datadir}/aclocal" This shouldn't be needed. > %nwam_manager.build -d %name-%version > > export PKG_CONFIG_PATH=../nwam-manager-%{nwam-manager.version} This is definitely not needed, since it's the end of the script. > %install > rm -rf $RPM_BUILD_ROOT > %nwam_manager.install -d %name-%version > cd %{_builddir}/%name-%version/sun-manpages > make install DESTDIR=$RPM_BUILD_ROOT > > %if %build_l10n > %else > # REMOVE l10n FILES > rm -rf $RPM_BUILD_ROOT%{_datadir}/locale > rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]* > rm -f $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf > rm -f $RPM_BUILD_ROOT%{_datadir}/omf/*/*-??_??.omf > %endif > > %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}: > %{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):unsupported" > $RPM_BUILD_ROOT} > > %clean > rm -rf $RPM_BUILD_ROOT > > %post > %include icon-cache.script > > %post root > > %include gconf-install.script > > %files > %defattr (-, root, bin) > %dir %attr (0755, root, bin) %{_libexecdir} > %{_libexecdir}/* > %dir %attr (0755, root, sys) %{_datadir} > %dir %attr (0755, root, bin) %{_datadir}/nwam-manager > %dir %attr (0755, root, bin) %{_datadir}/nwam-manager/icons > %attr (-, root, other) %{_datadir}/nwam-manager/*.* > %attr (-, root, other) %{_datadir}/nwam-manager/icons/* Why are these root:other? > %dir %attr (0755, root, other) %{_datadir}/icons > %attr (-, root, other) %{_datadir}/icons/* > %dir %attr(0755, root, bin) %{_mandir} > %dir %attr(0755, root, bin) %{_mandir}/* > %{_mandir}/*/* > > %files root > %defattr(-, root, sys) > %attr(0755, root, sys) %dir %{_sysconfdir} > %{_sysconfdir}/gconf/schemas/nwam-manager.schemas You need a %preun root script that uninstalls this schema. Laca > %dir %attr (-, root, sys) %{_sysconfdir}/xdg > %dir %attr (-, root, sys) %{_sysconfdir}/xdg/autostart > %attr (-, root, sys) %{_sysconfdir}/xdg/autostart/* > > %if %build_l10n > %files l10n > %defattr (-, root, bin) > %dir %attr (0755, root, sys) %{_datadir} > %dir %attr (0755, root, other) %{_datadir}/gnome > %attr (-, root, other) %{_datadir}/locale > %{_datadir}/gnome/help/*/[a-z]* > %{_datadir}/omf/*/*-[a-z]*.omf > %endif > > %changelog > * Wed Sep 3 2008 - darren.kenny at sun.com > - Initial delivery. >
