Hi all,

Spec files for libnotify, libsexy & notification-daemon are attached.
Please review them. Currently, I just provide libnotify.spec,
libsexy.spec, notification.spec & SUNWlibnotify.spec. That means I
integrate 3 modules into 1 spec file SUNWlibnotify.spec. I am not sure
whether this is a good idea or not. Maybe it's better to separate
libsexy from the others. Any idea?

Regards,

Jedy Wang 
-------------- next part --------------
#
# spec file for package libnotify
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
#Owner: jedy
#

Name:         libnotify
Version:      0.4.3
Release:      1
Summary:      libnotify is a notification system for the GNOME desktop 
environment.

Group:        System/Libraries
License:      LGPL
URL:          http://www.galago-project.org/news/index.php
Distribution: java-desktop-system
Vendor:       Sun Microsystems, Inc.
Source:       
http://www.galago-project.org/files/releases/source/libnotify/libnotify-%{version}.tar.bz2

BuildRoot:    %{_tmppath}/%{name}-%{version}-build

%define gtk2_version 2.6.0
%define dbus_version 0.36

BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: dbus-devel >= %{dbus_version}
Requires: gtk2 >= %{gtk2_version}
Requires: dbus >= %{dbus_version}

%description
Libnotify is a notification system for the GNOME desktop environment.

%prep
%setup -q

%build
%ifos linux
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
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 --copy --force
aclocal $ACLOCAL_FLAGS
autoheader
automake -a -c -f 
autoconf
./configure --prefix=%{_prefix} \
                --libdir=%{_libdir}
make -j $CPUS

%install
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.a" -exec rm -f {} ';'
find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.la" -exec rm -f {} ';'

%clean 
rm -rf $RPM_BUILD_ROOT

%files 
%defattr (-, root, root)
%doc README AUTHORS COPYING
%{_bindir}/*
%{_libdir}/*.so*
%{_libdir}/pkgconfig/*
%{_includedir}/libnotify/*
%{_datadir}/gtk-doc/*

%changelog
* Mon Dec 18 2006 - jedy.wang at sun.com
- Initial spec
-------------- next part --------------
#
# spec file for package libsexy
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
#Owner: jedy
#

%include Solaris.inc

Name:         libsexy
Version:      0.1.10
Release:      1
Summary:      libsexy is a collection of GTK+ widgets that extend the 
functionality of such standard widget.

Group:        System/Libraries
License:      LGPL
URL:          http://www.chipx86.com/wiki/Libsexy
Distribution: java-desktop-system
Vendor:       Sun Microsystems, Inc.
Source:       
http://releases.chipx86.com/libsexy/libsexy/libsexy-%{version}.tar.gz
Patch1:       libsexy-01-struct.diff

BuildRoot:    %{_tmppath}/%{name}-%{version}-build

%define libxml_version 2.0.0
%define gtk2_version 2.2.0
%define pangto_version 1.4.0
%define isocodes_version 0.49

BuildRequires: gtk2-devel >= %{gtk2_version}
BuildRequires: libxml-devel >= %{libxml_version}
Requires: pango-devel >= %{pango_version}
BuildRequires: iso-codes-devel
Requires: gtk2-libs >= %{gtk2_version}
Requires: libxml >= %{libxml_version}
Requires: pango >= %{pango_version}
Requires: iso-codes

%description
libsexy is a collection of GTK+ widgets that extend the functionality of such 
standard widget.

%prep
%setup -q
%patch1 -p1

%build
%ifos linux
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
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 --copy --force
aclocal $ACLOCAL_FLAGS
autoheader
automake -a -c -f 
autoconf
./configure --prefix=%{_prefix} \
                --libdir=%{_libdir} \
        --disable-gtk-doc
make -j $CPUS

%install
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.a" -exec rm -f {} ';'
find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.la" -exec rm -f {} ';'

%clean 
rm -rf $RPM_BUILD_ROOT

%files 
%defattr (-, root, root)
%{_libdir}/*.so*
%{_includedir}/libsexy/*
%{_datadir}/gtk-doc/*
%{_libdir}/pkgconfig/*

%changelog
* Mon Dec 18 2006 - jedy.wang at sun.com
- Initial spec
-------------- next part --------------
#
# spec file for package notificatioin-daemon
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
#Owner: jedy
#

Name:         notification-daemon
Version:      0.3.6
Release:      1
Summary:      A notification daemon for the GNOME desktop environment.

Group:        System/Libraries
License:      GPL
URL:          http://www.galago-project.org/news/index.php
URL:          http://www.galago-project.org/news/index.php
Distribution: java-desktop-system
Source:       
http://www.galago-project.org/files/releases/source/notification-daemon/notification-daemon-%{version}.tar.bz2

BuildRoot:    %{_tmppath}/%{name}-%{version}-build

BuildRequires: gtk2 >= 2.4
BuildRequires: dbus-devel >= 0.36
BuildRequires: gnome-panel-devel
BuildRequires: libpopt-devel
BuildRequires: libsexy-devel >= 0.1.3
Requires: gtk2
Requires: dbus
Requires: gnome-panel
Requires: libpopt
Requires: libsexy

%package root
Summary:                 %{summary} - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc

%prep
%setup -q

%build
%ifos linux
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
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 --copy --force
aclocal $ACLOCAL_FLAGS
autoheader
automake -a -c -f 
autoconf
./configure --prefix=%{_prefix} \
                --libexecdir=%{_libexecdir} \
                --sysconfdir=%{_sysconfdir} \
                --libdir=%{_libdir}
make -j $CPUS

%install
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.a" -exec rm -f {} ';'
find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.la" -exec rm -f {} ';'

%clean 
rm -rf $RPM_BUILD_ROOT

%files 
%defattr (-, root, root)
%{_sysconfdir}/gconf/schemas/notification-daemon.schemas
%{_libdir}/notification-daemon-1.0/engines/*.so*
%{_libexecdir}/notification-daemon
%{_datadir}/dbus-1/services/org.freedesktop.Notifications.service
%{_datadir}/locale/nl


%changelog
* Mon Dec 18 2006 - jedy.wang at sun.com
- Initial spec
-------------- next part --------------
#
# spec file for package SUNWlibnotify
#
# includes module(s): libnotify, libsexy & notification-daemon
#
# Copyright (c) 2004 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: jedy
#

%include Solaris.inc
%use libnotify = libnotify.spec
%use libsexy = libsexy.spec
%use notificationdaemon = notification-daemon.spec

Name:         SUNWlibnotify
Summary:      %libnotify.summary
Version:      %{default_pkg_version}
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
Autoreqprov:  on
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWiso-codes-devel
BuildRequires: SUNWdbus-devel
BuildRequires: SUNWlxml-devel
Requires: SUNWgnome-base-libs
Requires: SUNWiso-codes
Requires: SUNWdbus
Requires: SUNWlxml

%package root
Summary:                 %{summary} - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc

%package devel
Summary:       %{summary} - development files
SUNW_BaseDir:  %{_basedir}
%include default-depend.inc
Requires:      %name

%prep
rm -rf %name-%version
mkdir -p %name-%version
%libnotify.prep -d %name-%version
#cd %{_builddir}/%name-%version
#bzcat %SOURCE0 | tar xf -
%libsexy.prep -d %name-%version
%notificationdaemon.prep -d %name-%version

%build
export CFLAGS="%optflags"
%libnotify.build -d %name-%version
%libsexy.build -d %name-%version
%notificationdaemon.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%libnotify.install -d %name-%version
%libsexy.install -d %name-%version
%notificationdaemon.install -d %name-%version
find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.a" -exec rm -f {} ';'
find $RPM_BUILD_ROOT%{_libdir} -type f -name "*.la" -exec rm -f {} ';'
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale

%clean 
rm -rf $RPM_BUILD_ROOT

%post root
( echo 'test -x /usr/bin/gconftool-2 || {';
  echo '  echo "ERROR: gconftool-2 not found"';
  echo '  exit 1';
  echo '}';
  echo 'umask 0022';
  echo 'GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults';
  echo 'export GCONF_CONFIG_SOURCE';
  echo '/usr/bin/gconftool-2 --makefile-install-rule 
%{_sysconfdir}/gconf/schemas/*.schemas'
) | $BASEDIR/var/lib/postrun/postrun -u -c JDS_wait

%preun root
test -x $BASEDIR/var/lib/postrun/postrun || exit 0
( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
  echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf 
schemas"';
  echo '  exit 0';
  echo '}';
  echo 'umask 0022';
  echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
  echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
  echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
  echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
  echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
  echo 'schemas="$SDIR/notification-daemon.schemas';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule 
$schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS_wait -a

%files 
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
#%dir %attr (0755, root, bin) %dir %{_libdir}
%{_libdir}/*.so*
%dir %attr (0755, root, bin) %dir %{_libdir}/notification-daemon-1.0
%dir %attr (0755, root, bin) %dir %{_libdir}/notification-daemon-1.0/engines
%{_libdir}/notification-daemon-1.0/engines/*.so*
%dir %attr (0755, root, bin) %{_libexecdir}
%{_libexecdir}/notification-daemon
%dir %attr (0755, root, bin) %{_datadir}/dbus-1
%dir %attr (0755, root, bin) %{_datadir}/dbus-1/services
%{_datadir}/dbus-1/services/org.freedesktop.Notifications.service

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %dir %{_includedir}
%dir %attr (0755, root, bin) %dir %{_includedir}/libnotify
%{_includedir}/libnotify/*
%dir %attr (0755, root, bin) %dir %{_includedir}/libsexy
%{_includedir}/libsexy/*
%dir %attr (0755, root, sys) %dir %{_datadir}
%dir %attr (0755, root, sys) %dir %{_datadir}/gtk-doc
%{_datadir}/gtk-doc/*
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*

%files root
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/notification-daemon.schemas

%changelog
* Mon Dec 18 2006 - jedy.wang at sun.com
- Initial spec

Reply via email to