[Bug 483615] Review Request: CodeAnalyst - Performance Analysis Suite for AMD-based System (based on Oprofile)

bugzilla at redhat.com bugzilla at redhat.com
Thu Mar 5 07:21:31 UTC 2009


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=483615





--- Comment #21 from Suravee Suthikulpanit <suravee.suthikulpanit at amd.com>  2009-03-05 02:21:29 EDT ---
Updated spec file
-------------------------------
Summary:       CodeAnalyst is a Performance Analysis Suite for AMD-based System
Name:          CodeAnalyst-gui
Version:       2.8.38
Release:       5%{?dist}
License:       GPLv2
Group:         Development/System
URL:           http://developer.amd.com/cpu/CodeAnalyst/codeanalystlinux

Source0:      
http://developer.amd.com/media/CALinuxSnapshot/%{name}-%{version}.tar.gz
Source1:       CodeAnalyst-gui.desktop
Source2:       DiffAnalyst-gui.desktop

# Use oprofile default cpu/watershed/event-buffer size
# since using stock oprofile daemon/driver
Patch0:        ca-use-oprofile-default-buffersize.patch

# This patch allows us to use the DESTDIR variable in install section.
Patch1:        ca-destdir.patch

Requires:      popt
Requires:      binutils
Requires:      elfutils-libelf
Requires:      qt3
Requires:      oprofile >= 0.9.4
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig 
# This is for /sbin/service
Requires(preun): initscripts
Requires(postun): initscripts

BuildRequires: automake
BuildRequires: libtool
BuildRequires: popt-devel
BuildRequires: binutils-devel
BuildRequires: elfutils-libelf-devel
BuildRequires: qt3-devel >= 3.3
BuildRequires: qt3-designer >= 3.3
BuildRequires: oprofile >= 0.9.4
BuildRequires: desktop-file-utils

BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

# Unsupported architecture list due to non-AMD based system.
ExcludeArch: ppc ppc64 s390 s390x alpha alphaev6 sparcv9 sparc64


%description
CodeAnalyst is a performance analysis suite. It provids graphical
utilitys for running Oprofile, and analyzing result on AMD-based systems.
CodeAnalyst includes several features to aid profile analysis such as
inline-function analysis, code-block analysis, and a utility for
profile comparison, DiffAnalayst.


%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .ca-use-oprofile-default-buffersize
%patch1 -p0 -b .ca-destdir


%build
./autogen.sh
%configure \
  --with-oprofile=%{_prefix} \
  --disable-oprofile-lib \
  --disable-static

make %{?_smp_mflags} all \
  CFLAGS="${RPM_OPT_FLAGS}" \
  CXXFLAGS="${RPM_OPT_FLAGS}"


%install
rm -rf ${RPM_BUILD_ROOT}

make -C src/ca/libs    install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/gui     install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/diffgui install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/utils   install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/scripts install DESTDIR=${RPM_BUILD_ROOT}

# These are help documents and images which
# the GUIs is using for the "Help" on toolbar.
# GUI will not run correctly if these are not available
make -C doc install DESTDIR=${RPM_BUILD_ROOT}

install -pD -m 755 src/ca/scripts/codeanalyst
${RPM_BUILD_ROOT}%{_initrddir}/codeanalyst

install -pD -m 755 careport.sh ${RPM_BUILD_ROOT}%{_bindir}/careport.sh

# Remove these unnecessary files from the installation
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/lib*.{la,so}

# Install CodeAnalyst-gui.desktop file
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1}

# Install DiffAnalyst-gui.desktop file
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2}


%clean
rm -rf ${RPM_BUILD_ROOT}


%pre
# Adding "amdca" user group
getent group amdca >/dev/null || /usr/sbin/groupadd -r amdca
exit 0


%post
/sbin/ldconfig

# Install init script
/sbin/chkconfig --add codeanalyst


%preun
# Deinit 
if [ $1 = 0 ] ; then
    /sbin/service codeanalyst stop >/dev/null 2>&1
    /sbin/chkconfig --del codeanalyst
fi
exit 0


%postun
/sbin/ldconfig
if [ "$1" -ge "1" ] ; then
    /sbin/service codeanalyst condrestart >/dev/null 2>&1 || :
fi


%files
%defattr(-,root,root,-)
%doc README COPYING INSTALLATION
%{_bindir}/CodeAnalyst
%{_bindir}/DiffAnalyst
%{_bindir}/careport.sh
%{_bindir}/capackage.sh
%{_sbindir}/ca_user_manager
%{_sbindir}/ca_oprofile_controller
%{_libdir}/lib*.so.*
%dir %{_datadir}/codeanalyst
%{_datadir}/codeanalyst/*
%{_datadir}/applications/CodeAnalyst-gui.desktop
%{_datadir}/applications/DiffAnalyst-gui.desktop
%{_initrddir}/codeanalyst


%changelog
* Thu Mar 2 2009 - Suravee Suthikulpanit <suravee.suthikulpanit at amd.com>
- 2.8.38-5
- Usign "install -p"
- Using /sbin/service in preun and postun

* Thu Mar 2 2009 - Suravee Suthikulpanit <suravee.suthikulpanit at amd.com>
- 2.8.38-4
- Use "configure" macro instead of ./configure
- Add patch1:ca-destdir.patch and make use of DESTDIR variable.

* Thu Mar 2 2009 - Suravee Suthikulpanit <suravee.suthikulpanit at amd.com>
- 2.8.38-3
- Clean up and reorganize the spec file.
- Update "install -D -m 755"
- Explicitely declare /usr/share/codeanalyst directory in files section.
- Remove the echo in install section.

* Thu Feb 18 2009 - Suravee Suthikulpanit <suravee.suthikulpanit at amd.com>
- 2.8.38-2
- Use upstream URL for source

* Thu Feb 12 2009 - Suravee Suthikulpanit <suravee.suthikulpanit at amd.com>
- 2.8.38-1
- Using new buildroot string
- Remove #### partitioning lines
- Fixed the build flag (using $RPM_OPT_FLAGS)
- Change service name from codeanalyst_init to codeanalyst
- Add /var/lock/subsys/codeanalyst lock file for service start/stop
- Add version number to shared libraries (.so files)

* Thu Feb 05 2009 - Suravee Suthikulpanit <suravee.suthikulpanit at amd.com>
- 2.8.38-0
- Add patch0: ca-use-oprofile-default-buffersize.patch
- Clean up to meet Fedora Packaging Guideline
- Bump the version due to changes in the CodeAnalyst.

* Tue Jan 27 2009 - Suravee Suthikulpanit <suravee.suthikulpanit at amd.com>
- 2.8.37-1
- Initial revision

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.




More information about the Fedora-package-review mailing list