From b3dff8bd720b9f40e3add55bb3bfd3170b862bf7 Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 25 Oct 2009 21:47:12 +0000 Subject: [PATCH] .rpm fixes git-svn-id: svn://ultimatepp.org/upp/trunk@1658 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppbox/Scripts/upp.spec | 323 ++++++++++++++++++++-------------------- 1 file changed, 163 insertions(+), 160 deletions(-) diff --git a/uppbox/Scripts/upp.spec b/uppbox/Scripts/upp.spec index efaaf4c65..0270f7c2a 100644 --- a/uppbox/Scripts/upp.spec +++ b/uppbox/Scripts/upp.spec @@ -1,160 +1,163 @@ -# How to build example: rpmbuild -tb --define 'version 1314' --define "date $(LC_TIME=En date '+%a %b %d %Y')" upp-x11-src-1314.tar.gz - -%define name upp -#define version 1314 -#define $(LC_TIME=En date '+%a %b %d %Y') -%define release 1 - -%define title Ultimate++ -%define longtitle C++ cross-platform rapid application development suite - -Summary: %longtitle -Name: %name -Version: %version -Release: %release -License: BSD -Group: Development/C++ -URL: http://www.ultimatepp.org -Source0: %{name}-x11-src-%{version}.tar.gz - -# Common Buildrequires -Buildrequires: gcc gcc-c++ gtk2-devel pango-devel atk-devel cairo-devel - -# Mandriva specific Buildrequires -%if "%?mdvver" != "" -Buildrequires: X11-devel freetype2-devel expat-devel - -# OpenSuse specific Buildrequires -%else -%if "%?suse_version" != "" -Buildrequires: patch make xorg-x11-devel freetype2-devel libexpat-devel - -# Fedora specific Buildrequires -%else -Buildrequires: xorg-x11-server-devel freetype-devel expat-devel -%endif -%endif - -# ----- -Requires: gcc gcc-c++ gtk2-devel pango-devel atk-devel cairo-devel -Requires: valgrind - -# Mandriva specific Requires -%if "%?mdvver" != "" -Requires: X11-devel freetype2-devel expat-devel - -# OpenSuse specific Requires -%else -%if "%?suse_version" != "" -Requires: xorg-x11-devel freetype2-devel libexpat-devel - -# Fedora specific Requires -%else -Requires: xorg-x11-server-devel freetype-devel expat-devel -%endif -%endif - -# ------- -Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot - -#----------- -%description -The U++ integrated development environment, TheIDE, introduces modular concepts to C++ -programming. It provides: - - - TheIDE, a visual designers for U++ libraries - - Topic++, for documenting code and creating rich text resources - - Assist++, a powerful C++ code analyzer providing code completion, - navigation and transformation - - BLITZ-build technology to speedup C++ rebuilds up to 4 times - -#---- -%prep - -%setup -q -n %{name}-x11-src-%{version} - - -# ---- -%build - -make -C uppsrc \ - -e LIBPATH=$(pkg-config --libs-only-L x11 freetype2 gtk+-2.0 glib-2.0 cairo pango atk) \ - -e CINC=" -I. $(pkg-config --cflags x11 freetype2 gtk+-2.0 glib-2.0 cairo pango atk)" \ - -e UPPOUT="$PWD/out/" \ - -e OutFile="$PWD/out/ide.out" - -#------- -%install -rm -rf %{buildroot} - -install -d %{buildroot}/%{_bindir} -install -d %{buildroot}/%{_desktopdir} -install -d %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps -install -d %{buildroot}/%{_datadir}/%{name} - -install out/ide.out %{buildroot}/%{_bindir}/theide - -cp -p uppsrc/ide/theide.desktop %{buildroot}/%{_desktopdir}/theide.desktop -cp -p uppsrc/ide/theide-48.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/theide.png - -cp -a bazaar %{buildroot}/%{_datadir}/%{name}/ -# cp -a Common %{buildroot}/%{_datadir}/%{name}/ -cp -a uppsrc %{buildroot}/%{_datadir}/%{name}/ -cp -a examples %{buildroot}/%{_datadir}/%{name}/ -cp -a reference %{buildroot}/%{_datadir}/%{name}/ -cp -a tutorial %{buildroot}/%{_datadir}/%{name}/ - -# We create our own GCC.bm -# cp -p uppsrc/ide/GCC.bm %{buildroot}/%{_datadir}/%{name}/ - -INCLUDEDIR=$( pkg-config --cflags x11 freetype2 gtk+-2.0 glib-2.0 cairo pango atk | awk ' { gsub ( / /, "" ) ; gsub ( /-I/, ";" ) ; sub ( /;/, "" ) ; print $0 }' ) -LIBDIR=$( pkg-config --libs-only-L x11 freetype2 gtk+-2.0 glib-2.0 cairo pango atk | awk ' { gsub ( / /, "" ) ; gsub ( /-I/, ";" ) ; sub ( /;/, "" ) ; print $0 }' ) - -cat > %{buildroot}/%{_datadir}/%{name}/GCC.bm << EOF -BUILDER = "GCC"; -COMPILER = "g++"; -DEBUG_INFO = "2"; -DEBUG_BLITZ = "1"; -DEBUG_LINKMODE = "1"; -DEBUG_OPTIONS = "-O0"; -DEBUG_FLAGS = ""; -RELEASE_BLITZ = "0"; -RELEASE_LINKMODE = "1"; -RELEASE_OPTIONS = "-O1 -ffunction-sections"; -RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20"; -RELEASE_FLAGS = ""; -DEBUGGER = "gdb"; -PATH = ""; -INCLUDE = "$INCLUDEDIR"; -LIB = "$LIBDIR"; -REMOTE_HOST = ""; -REMOTE_OS = ""; -REMOTE_TRANSFER = ""; -REMOTE_MAP = ""; -LINKMODE_LOCK = "0"; -EOF - - -#----- -%clean -rm -fr %{buildroot} - -#----- -%files -%defattr(-,root,root,-) -# %doc COPYING README INSTALL -%doc uppsrc/ide/Copying -%{_bindir}/theide -%{_desktopdir}/theide.desktop -%{_datadir}/icons/hicolor/48x48/apps/theide.png -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/* - -#--------- -%changelog -* %date Amrein-Marie Christophe %version-1 -- New release - -* Fri Aug 15 2008 Amrein-Marie Christophe 2008.1-1 -- First package - +# How to build example: rpmbuild -tb --define 'version 1314' --define "date $(LC_TIME=En date '+%a %b %d %Y')" upp-x11-src-1314.tar.gz + +%define name upp +#define version 1314 +#define $(LC_TIME=En date '+%a %b %d %Y') +%define release 1 + +%define title Ultimate++ +%define longtitle C++ cross-platform rapid application development suite + +Summary: %longtitle +Name: %name +Version: %version +Release: %release +License: BSD +Group: Development/C++ +URL: http://www.ultimatepp.org +Source0: %{name}-x11-src-%{version}.tar.gz + +# Common Buildrequires +Buildrequires: gcc gcc-c++ gtk2-devel pango-devel atk-devel cairo-devel + +# Mandriva specific Buildrequires +%if "%?mdvver" != "" +Buildrequires: X11-devel freetype2-devel expat-devel + +# OpenSuse specific Buildrequires +%else +%if "%?suse_version" != "" +Buildrequires: patch make xorg-x11-devel freetype2-devel libexpat-devel + +# Fedora specific Buildrequires +%else +Buildrequires: xorg-x11-server-devel freetype-devel expat-devel +%endif +%endif + +# ----- +Requires: gcc gcc-c++ gtk2-devel pango-devel atk-devel cairo-devel +Requires: valgrind + +# Mandriva specific Requires +%if "%?mdvver" != "" +Requires: X11-devel freetype2-devel expat-devel + +# OpenSuse specific Requires +%else +%if "%?suse_version" != "" +Requires: xorg-x11-devel freetype2-devel libexpat-devel + +# Fedora specific Requires +%else +Requires: xorg-x11-server-devel freetype-devel expat-devel +%endif +%endif + +# ------- +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot + +#----------- +%description +The U++ integrated development environment, TheIDE, introduces modular concepts to C++ +programming. It provides: + + - TheIDE, a visual designers for U++ libraries + - Topic++, for documenting code and creating rich text resources + - Assist++, a powerful C++ code analyzer providing code completion, + navigation and transformation + - BLITZ-build technology to speedup C++ rebuilds up to 4 times + +#---- +%prep + +%setup -q -n %{name}-x11-src-%{version} + + +# ---- +%build + +make -C uppsrc \ + -e LIBPATH=$(pkg-config --libs-only-L x11 freetype2 gtk+-2.0 glib-2.0 cairo pango atk) \ + -e CINC=" -I. $(pkg-config --cflags x11 freetype2 gtk+-2.0 glib-2.0 cairo pango atk)" \ + -e UPPOUT="$PWD/out/" \ + -e OutFile="$PWD/out/ide.out" + +#------- +%install +rm -rf %{buildroot} + +install -d %{buildroot}/%{_bindir} +install -d %{buildroot}/%{_desktopdir} +install -d %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps +install -d %{buildroot}/%{_datadir}/pixmaps +install -d %{buildroot}/%{_datadir}/%{name} + +install out/ide.out %{buildroot}/%{_bindir}/theide + +cp -p uppsrc/ide/theide.desktop %{buildroot}/%{_desktopdir}/theide.desktop +cp -p uppsrc/ide/theide-48.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/theide.png +cp -p uppsrc/ide/theide-48.png %{buildroot}/%{_datadir}/pixmaps/theide.png + +cp -a bazaar %{buildroot}/%{_datadir}/%{name}/ +# cp -a Common %{buildroot}/%{_datadir}/%{name}/ +cp -a uppsrc %{buildroot}/%{_datadir}/%{name}/ +cp -a examples %{buildroot}/%{_datadir}/%{name}/ +cp -a reference %{buildroot}/%{_datadir}/%{name}/ +cp -a tutorial %{buildroot}/%{_datadir}/%{name}/ + +# We create our own GCC.bm +# cp -p uppsrc/ide/GCC.bm %{buildroot}/%{_datadir}/%{name}/ + +INCLUDEDIR=$( pkg-config --cflags x11 freetype2 gtk+-2.0 glib-2.0 cairo pango atk | awk ' { gsub ( / /, "" ) ; gsub ( /-I/, ";" ) ; sub ( /;/, "" ) ; print $0 }' ) +LIBDIR=$( pkg-config --libs-only-L x11 freetype2 gtk+-2.0 glib-2.0 cairo pango atk | awk ' { gsub ( / /, "" ) ; gsub ( /-I/, ";" ) ; sub ( /;/, "" ) ; print $0 }' ) + +cat > %{buildroot}/%{_datadir}/%{name}/GCC.bm << EOF +BUILDER = "GCC"; +COMPILER = "g++"; +DEBUG_INFO = "2"; +DEBUG_BLITZ = "1"; +DEBUG_LINKMODE = "1"; +DEBUG_OPTIONS = "-O0"; +DEBUG_FLAGS = ""; +RELEASE_BLITZ = "0"; +RELEASE_LINKMODE = "1"; +RELEASE_OPTIONS = "-O1 -ffunction-sections"; +RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20"; +RELEASE_FLAGS = ""; +DEBUGGER = "gdb"; +PATH = ""; +INCLUDE = "$INCLUDEDIR"; +LIB = "$LIBDIR"; +REMOTE_HOST = ""; +REMOTE_OS = ""; +REMOTE_TRANSFER = ""; +REMOTE_MAP = ""; +LINKMODE_LOCK = "0"; +EOF + + +#----- +%clean +rm -fr %{buildroot} + +#----- +%files +%defattr(-,root,root,-) +# %doc COPYING README INSTALL +%doc uppsrc/ide/Copying +%{_bindir}/theide +%{_desktopdir}/theide.desktop +%{_datadir}/icons/hicolor/48x48/apps/theide.png +%{_datadir}/pixmaps/theide.png +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/* + +#--------- +%changelog +* %date Amrein-Marie Christophe %version-1 +- New release + +* Fri Aug 15 2008 Amrein-Marie Christophe 2008.1-1 +- First package +