Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:darqwan:Adun-GSLatest
gnustep-base
gnustep-base.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnustep-base.spec of Package gnustep-base
# Spec file for GNUstep Base (version 1.21.0) # on openSUSE Build Service Name: gnustep-base Summary: GNUstep Base library package Version: 1.21.0 Release: 1 License: GPL 3 Group: System/GUI/GNUstep Url: http://www.gnustep.org/ Source: %{name}-%{version}.tar.bz2 Source2: %name-rpmlintrc Patch1: gnustep-base-1.18.0-enable-tls.patch #SUSE specfile docs say prereq is deprecated and it causes the build to fail on Fedora #However the RPM macros doc says it must be used if various other macros #e.g. fillup_and_insserv are use. This change is a test for Fedora #Ignore Requires: on Fedora - they're not necessary and cause the build to fail %if %{defined suse_version} PreReq: %insserv_prereq Requires: gnustep-make libffi42 libobjc42 Requires: gnutls %endif BuildRequires: gnustep-make libffi-devel gcc-objc gmp-devel libxml2-devel BuildRequires: libxslt-devel openssl-devel zlib-devel gnutls #Handle different package names on fedora and suse %if %{defined suse_version} BuildRequires: libgnutls-devel mDNSResponder-devel %else BuildRequires: gnutls-devel avahi-compat-libdns_sd avahi-compat-libdns_sd-devel %endif BuildRequires: fdupes BuildRoot: %{_tmppath}/%{name}-%{version}-build %define gnustep_sh GNUstep.sh %define gs_config /etc/GNUstep/GNUstep.conf %define init_dir /etc/init.d %define gs_sysinit %{init_dir}/gdomap %define gs_daemon gdomap %define profile_dir /etc/profile.d %define gs_userstart GNUstep-start.sh %define gs_makefiles /usr/share/GNUstep/Makefiles %ifarch x86_64 %define gs_libraries /usr/lib64 %else %define gs_libraries /usr/lib %endif %define gs_library %{gs_libraries}/GNUstep %description The GNUstep Base Library is a powerful fast library of general- purpose, non-graphical Objective C classes, inspired by the superb OpenStep API but implementing Apple and GNU additions to the API as well. It includes, for example, classes for unicode strings, arrays, dictionaries, sets, byte streams, typed coders, invocations, notifications, notification dispatchers, scanners, tasks, files, networking, threading, remote object messaging support (distributed objects), event loops, loadable bundles, attributed unicode strings, xml, mime, user defaults. This package includes development headers too. It was configured for the FHS file system layout, customised for SUSE. %package devel Summary: Devel package for GNUstep Base Library Group: Development/Libraries Requires: %name = %version %description devel This package contains include files for developing applications using the GNUstep Base Library. %prep %setup -q %patch1 -p0 find . -type f -name "*.swp" -delete %build # Source GNUstep environment variables. This is done unconditionally # to ensure that the values appropriate to this build get defined, # irrespective of what happened to be in force for the build system. . %{gs_config} GNUSTEP_SH_EXPORT_ALL_VARIABLES="yes" . ${GNUSTEP_MAKEFILES}/%{gnustep_sh} # Configure and make. %if %{defined fedora} LIBFFIVERSION=$(pkg-config --modversion libffi) %endif CPPFLAGS="-Wno-unused" \ %configure --libdir=%{_libdir} \ %if %{defined fedora} --with-ffi-include=%{gs_libraries}/libffi-${LIBFFIVERSION}/include/ \ %endif --enable-ffi make %install # Source GNUstep environment variables. This is done unconditionally # to ensure that the values appropriate to this build get defined, # irrespective of what happened to be in force for the build system. . %{gs_config} GNUSTEP_SH_EXPORT_ALL_VARIABLES="yes" . ${GNUSTEP_MAKEFILES}/%{gnustep_sh} # Install into RPM "build root" directory. make -e DESTDIR=${RPM_BUILD_ROOT} \ GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ install # Create startup/shutdown script for gdomap service. # Note this version of the code is designed to fit in # with SuSE linux's version of sys V init. mkdir -p ${RPM_BUILD_ROOT}%{init_dir} cat > ${RPM_BUILD_ROOT}%{gs_sysinit} << "EOF" #!/bin/sh # # GNUstep daemons # ### BEGIN INIT INFO # Provides: %{gs_daemon} # Required-Start: $syslog $local_fs $remote_fs # Should-Start: # Required-Stop: $syslog $local_fs $remote_fs # Should-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: %{gs_daemon} service # Description: Start up the %{gs_daemon} service # used by GNUstep applications. ### END INIT INFO . /etc/rc.status . %{gs_config} case "${1}" in start) echo -n "Starting %{gs_daemon}: " startproc ${GNUSTEP_SYSTEM_TOOLS}/%{gs_daemon} echo # Remember status and be verbose rc_status -v ;; stop) echo -n "Stopping %{gs_daemon}: " killproc ${GNUSTEP_SYSTEM_TOOLS}/%{gs_daemon} echo # Remember status and be verbose rc_status -v ;; restart|reload) ${0} stop ${0} start # Remember status and be quiet rc_status ;; status) echo -n "Checking for service %{gs_daemon} " checkproc ${GNUSTEP_SYSTEM_TOOLS}/%{gs_daemon} rc_status -v ;; *) echo "Usage: %{gs_sysinit} {start|stop|status|restart|reload}" exit 1 esac rc_exit EOF chmod 755 ${RPM_BUILD_ROOT}%{gs_sysinit} # Create scripts to source GNUstep environment variables, # start up user GNUstep services gdnc & gpbs, and update cache # of services and applications, on user login. mkdir -p ${RPM_BUILD_ROOT}%{profile_dir} cat > ${RPM_BUILD_ROOT}%{profile_dir}/%{gs_userstart} << "EOF" #!/bin/sh . %{gs_config} function runtool { local toolpath=${GNUSTEP_SYSTEM_TOOLS}/${1} # Check whether the tool exists if [ -x ${toolpath} ] then # Check whether the tool is already running for this user if ! ps -U $(id -u) -o cmd --no-headers | grep -q "^${toolpath}\>" then ${toolpath} fi fi unset toolpath } if [ -d ${HOME}/${GNUSTEP_USER_DIR} ] then # Start up the GNUstep Distributed Notification Center daemon runtool gdnc # Start up the GNUstep PasteBoard Server daemon, if we're running X [ ${DISPLAY} ] && runtool gpbs # Start up the GNUstep Sound daemon if we have portaudio sound if portaudiolib=$(/sbin/ldconfig -p | grep '^[[:space:]]*libportaudio.so[[:space:]]') \ && [ -e $(echo ${portaudiolib} | sed 's/^.*=>[[:space:]]*\([^[:space:]]*\)$/\1/') ] then runtool gnustep_sndd fi unset portaudiolib # Run 'make_services' in background if possible. We run it in a subshell; # otherwise, shells with job control (like bash) output an annoying # message when make_services is done, while we want it to happen silently. [ -x "${GNUSTEP_SYSTEM_TOOLS}/make_services" ] \ && ("${GNUSTEP_SYSTEM_TOOLS}/make_services" &) fi EOF chmod 755 ${RPM_BUILD_ROOT}%{profile_dir}/%{gs_userstart} # save discspace: symlink duplicates #Fdupes macro not defined in fedora %if %{defined suse_version} %fdupes -s %buildroot %else fdupes -s %buildroot %endif %clean rm -rf ${RPM_BUILD_ROOT} %post if [ "${1}" = "1" ]; then # Path to GNUstep libraries was added to ld.so.conf in gnustep-make. # Run ldconfig to add gnustep-base libraries to the library cache. /sbin/ldconfig # Add lines for %{gs_daemon} into /etc/services, if not already there grep -q '^%{gs_daemon}' /etc/services \ || (echo -e "%{gs_daemon}\t\t538/tcp\t\t\t\t# GNUstep distributed objects" >> /etc/services \ && echo -e "%{gs_daemon}\t\t538/udp\t\t\t\t# GNUstep distributed objects" >> /etc/services) # Add the %{gs_daemon} service. Note this is not started # automatically - the user will need to start it using YaST2. %if %{defined suse_version} %{fillup_and_insserv -fy %{gs_daemon}} %else #Fedora only /sbin/chkconfig --add %{gs_daemon} #Apparently we can do all dist with this - just not yet #%service_add %{gs_daemon} %endif fi %preun if [ "${1}" = "0" ]; then # Stop the gdomap service %if %{defined suse_version} %stop_on_removal %{gs_daemon} %else #Fedora only if [ “$1” = 0 ] ; then service %{gs_daemon} stop >/dev/null 2>&1 fi /sbin/chkconfig --del %{gs_daemon} #For the future #%service_del_preun %{gs_daemon} %endif # Remove lines for gdomap from /etc/services mv -f /etc/services /etc/services.orig grep -v "^%{gs_daemon}[[:space:]]*538" /etc/services.orig > /etc/services rm -f /etc/services.orig fi %postun /sbin/ldconfig %if %{defined suse_version} %restart_on_update %{gs_daemon} %insserv_cleanup %else if [ “$1” -ge 1 ] ; then fi service %{gs_daemon} condrestart >/dev/null 2>&1 #For the future #%service_del_postun %{gs_daemon} %endif %files %defattr (-, root, root) %doc ANNOUNCE ChangeLog COPYING COPYING.LIB INSTALL NEWS README %{gs_libraries}/libgnustep-base.* %_bindir/HTMLLinker %_bindir/autogsdoc %_bindir/cvtenc %_bindir/defaults %_bindir/gdnc %attr (6755, root, root) %_bindir/%{gs_daemon} %_bindir/gspath %_bindir/make_strings %_bindir/pl* %_bindir/sfparse %_bindir/xmlparse %{gs_library} %{gs_makefiles} %{_mandir}/man?/* %config %{gs_sysinit} %config(noreplace) %{profile_dir}/%{gs_userstart} %files devel %defattr (-, root, root) %{_includedir}/*
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor