# # $Id$ # # Used if virtual name != real name (perl, ...) #%define srcname PBPKG Summary: FOSSology is a licenses exploration tool Summary(fr): FOSSology est un outil d'exploration de licenses Name: PBREALPKG Version: PBVER Release: PBTAGPBSUF License: PBLIC Group: PBGRP Url: PBURL Source: PBREPO/PBSRC #PBPATCHSRC BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) Requires: postgresql php php-pear php-pgsql libxml2 binutils bzip2 cpio mkisofs poppler-utils rpm tar unzip gzip httpd PBDEP BuildRequires: postgresql-devel libxml2 gcc make perl PBBUILDDEP %description PBDESC %description -l fr FOSSology est un outil d'exploration de licenses %prep %setup -q #PBPATCHCMD %build make %{?_smp_mflags} SYSCONFDIR=%{_sysconfdir} %install %{__rm} -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_usr} SYSCONFDIR=%{_sysconfdir} LOCALSTATEDIR=%{_var} install cat > $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/fossology.conf << EOF Alias /repo/ /usr/share/fossology/www/ AllowOverride None Options FollowSymLinks MultiViews Order allow,deny Allow from all # uncomment to turn on php error reporting #php_flag display_errors on #php_value error_reporting 2039 EOF %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc ChangeLog %doc COPYING COPYING.LGPL HACKING README INSTALL INSTALL.multi LICENSE #AUTHORS NEWS %dir %{_datadir}/* %dir %{_localstatedir}/* %dir %{_libexecdir}/* %dir %{_sysconfdir}/fossology %{_sysconfdir}/httpd/conf.d/*.conf %{_sysconfdir}/cron.d/* %{_bindir}/* %{_mandir}/man1/* %post # Adjust the kernel shmmax (described in detail in section 2.1.3) echo 512000000 > /proc/sys/kernel/shmmax grep -q kernel.shmmax /etc/sysctl.conf if [ $? -eq 0 ]; then perl -pi -e "s/kernel.shmmax\s*=.*/kernel.shmmax=512000000/" /etc/sysctl.conf else echo "kernel.shmmax=512000000" >> /etc/sysctl.conf fi # Adjust postgresql config (described in detail in section 2.1.4) # 266 > #hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file # 267 > #ident_file = 'ConfigDir/pg_ident.conf' # IDENT configuration file # 268 > #external_pid_file = '(none)' # write an extra pid file # 269 > listen_addresses = '*' # 270 > max_connections = 50 # 271 > #shared_buffers = 1000 # min 16 or max_connections*2, 8KB each # 272 > shared_buffers = 32768 # 273 > work_mem = 10240 # 274 > max_fsm_pages = 100000 # min max_fsm_relations*16, 6 bytes each # 275 > fsync = off # 276 > full_page_writes = off #recover from partial page writes # 277 > commit_delay = 1000 # 278 > effective_cache_size = 25000 # 279 > log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements # 280 > #log_line_prefix = '' # Special values: # Adjust PHP config (described in detail in section 2.1.5) # /etc/php5/php.ini # 291 max_execution_time = 90 # 292 memory_limit = 128M # 293 error_reporting = E_ALL & E_STRICT # 294 display_startup_errors = On # 295 log_errors = On # 296 log_errors_max_len = 0 # 297 error_log = /var/log/php5.log # 298 post_max_size = 700M # 299 upload_max_filesize = 701M # 300 In the "[soap]" section add # 301 extension=pgsql.so # 303 You should also edit /etc/php5/cli/php.ini to include the fossology directory # 304 in the php command line interface path: # 305 include_path = ".:/usr/local/share/fossology/php:/usr/local/share/fossology/www" # Add apache config for fossology (described in detail in section 2.1.6) - done in install /etc/init.d/httpd reload # Run the postinstall script /usr/lib/fossology/fo-postinstall # Test that things are installed correctly /usr/lib/fossology/fossology-scheduler -t if [ $? -ne 0 ]; then exit -1 fi chkconfig --add fossology /etc/init.d/fossology start %changelog PBLOG