LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ubudsl.spec of Package UbuDSL (Project home:adrian5632)

%define name	   ubudsl
%define version    1.0.0.286
%define release    1suse
%define pkg_info   %{version}_%{release}
%define build_time $(date)


Name: %name
Version: %version 
Release: %release
Summary: UbuDSL - an ADSL connection configuration tool
License: LGPL
Group: System
ExclusiveArch: i586 x86_64
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/build-root-%{name}-%{version}
Packager: adrian5632
Url: http://ubudsl.com/
Provides: libubudsl.so.1
Distribution: openSUSE
Requires: alsa-utils >= 1.0.14 ppp >= 2.4.4 linux-atm
BuildRequires: libqt4-devel >= 4.3.0 cmake >= 2.6 kde4-filesystem update-desktop-files


%description
UbuDSL helps you configure and manage your ADSL connection.
It supports only USB ADSL modems such as Sagem F@st 800,
Thomson SpeedTouch 330, ZTE ZXDSL 852 and other which are
supported by the ueagle-atm, speedtch, cxacru and unicorn-usb-eth
drivers.

%prep
rm -rf $RPM_BUILD_ROOT
rm -rf build
mkdir $RPM_BUILD_ROOT

%setup -q

%build
%ifarch x86_64
%define LIB64 ON
%else
%define LIB64 OFF
%endif
%cmake_kde4 -d build -- -DPKG_INFO="%{pkg_info}" -DMODULES="SoundModule;ConnectionLogModule" -DLIB_64:BOOL=%{LIB64} -DBUILTIN_BR2684CTL:BOOL=OFF ..
%make_jobs

%install
cd build
%makeinstall
cd ..
rm -rf $RPM_BUILD_ROOT/usr/include
%ifarch x86_64
rm -rf $RPM_BUILD_ROOT/usr/lib64/ubudsl/drivers
%else
rm -f $RPM_BUILD_ROOT/usr/lib/ubudsl/drivers/precompiled/Ubuntu*
%endif
%suse_update_desktop_file -u -r -c "ubudsl_configuration" "UbuDSL" "UbuDSL Configuration" "ubudsl" "ubudsl.png" System Network
%suse_update_desktop_file -u -r -c "ubudsl_applet" "UbuDSL Applet" "UbuDSL Applet" "UbuDSL_Applet" "ubudsl.png" Network Monitor 


%post
if [ -x /usr/lib/lsb/install_initd ]; then
  /usr/lib/lsb/install_initd /etc/init.d/ubudsld
elif [ -x /sbin/chkconfig ]; then
  /sbin/chkconfig --add ubudsld
else
   for i in 2 3 4 5; do
        ln -sf /etc/init.d/ubudsld /etc/rc.d/rc${i}.d/S90ubudsld
   done
   for i in 1 6; do
        ln -sf /etc/init.d/ubudsld /etc/rc.d/rc${i}.d/K10ubudsld
   done
fi
/etc/init.d/dbus restart > /dev/null 2>&1
/etc/init.d/ubudsld start > /dev/null 2>&1

%preun
if [ $1 = 0 ]; then
  /etc/init.d/ubudsld stop  > /dev/null 2>&1
  if [ -x /usr/lib/lsb/remove_initd ]; then
    /usr/lib/lsb/install_initd /etc/init.d/ubudsld
  elif [ -x /sbin/chkconfig ]; then
    /sbin/chkconfig --del ubudsld
  else
    rm -f /etc/rc.d/rc?.d/???ubudsld
  fi
fi

%postun
rm -rf /var/log/ubudsl
ldconfig

%clean
rm -rf %{buildroot} %{_builddir}/%{name}-%{version}
#rm -rf $RPM_BUILD_ROOT/*
#rm -rf $RPM_BUILD_DIR/*

%files
%defattr(-,root,root) 
/*