#4 A fc7 spec file to build the rpm

open
nobody
None
5
2007-12-03
2007-12-03
MessCode
No

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# file: fgrun.spec
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Summary: FlightGear Launch Control
Name: fgrun
Version: 0.4.8
Release: 0%{?dist}
License: GPL
Group: Applications/Games
URL: http://sourceforge.net/projects/fgrun/
Source0: http://downloads.sourceforge.net/fgrun/fgrun-0.4.8.tar.gz
Source1: %{name}.desktop
#========== If you have Icon file ============
#Source2: %{name}-icons.tar.gz
#=============================================
BuildRequires: autoconf automake fltk-devel plib-devel SimGear-devel openal-devel
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: FlightGear

%description
A graphical frontend to run FlightGear.

%prep
%setup -q

%build
%configure --bindir=%{_bindir}
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} install
desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE1}
mkdir $RPM_BUILD_ROOT%{_sysconfdir} $RPM_BUILD_ROOT%{_sysconfdir}/skel $RPM_BUILD_ROOT%{_sysconfdir}/skel/.fltk $RPM_BUILD_ROOT%{_sysconfdir}/skel/.fltk/flightgear.org
touch $RPM_BUILD_ROOT%{_sysconfdir}/skel/.fltk/flightgear.org/fgrun.prefs
echo -e "\n[.]\n\nfg_exe:`whereis fgfs | gawk '{ print $2 }'`\nfg_root:`whereis FlightGear | gawk '{ print $2 }'`">>$RPM_BUILD_ROOT%{_sysconfdir}/skel/.fltk/flightgear.org/fgrun.prefs
#=========== If you have icons ==============================
#mkdir $RPM_BUILD_ROOT%{_datadir}/icons
#tar -zxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_datadir}/icons/
#============================================================

%clean
rm -rf ${RPM_BUILD_ROOT}

%post
update-desktop-database &> /dev/null ||:
#========== If you have icons =====================
#touch --no-create %{_datadir}/icons/hicolor || :
#%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
#==================================================

%preun
update-desktop-database &> /dev/null ||:
#========== If you have icons =====================
#touch --no-create %{_datadir}/icons/hicolor || :
#%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
#==================================================

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog NEWS README
%{_sysconfdir}/skel/.fltk
%{_bindir}/*
%{_datadir}/applications/*.desktop
#========== If you have icons =====================
#%{_datadir}/icons/hicolor/16x16/apps/fgrun.png
#%{_datadir}/icons/hicolor/22x22/apps/fgrun.png
#%{_datadir}/icons/hicolor/24x24/apps/fgrun.png
#%{_datadir}/icons/hicolor/32x32/apps/fgrun.png
#%{_datadir}/icons/hicolor/48x48/apps/fgrun.png
#%{_datadir}/icons/hicolor/72x72/apps/fgrun.png
#%{_datadir}/icons/hicolor/96x96/apps/fgrun.png
#%{_datadir}/icons/hicolor/128x128/apps/fgrun.png
#%{_datadir}/icons/hicolor/192x192/apps/fgrun.png
#==================================================
%changelog

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# file: fgrun.desktop
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Desktop Entry]
Encoding=UTF-8
Name=FlightGear Launch Control
GenericName=FlightGear Launch Control
Comment=A graphical frontend to run FlightGear
Exec=fgrun
Icon=fgrun.png
Terminal=false
Type=Application
Categories=Game;
X-Desktop-File-Install-Version=0.12

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks