diff --git a/README.md b/README.md index 3fff0ed..ed53c0c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # strigi +Strigi is a daemon which uses a very fast and efficient crawler that can index data on your harddrive. +It indexes within archives like zip files, and calculates a hash for each file, so it can easily detect duplicates. + diff --git a/strigi-0.7.5-ffmpeg.patch b/strigi-0.7.5-ffmpeg.patch new file mode 100644 index 0000000..ee1bfc0 --- /dev/null +++ b/strigi-0.7.5-ffmpeg.patch @@ -0,0 +1,166 @@ +diff -ruN strigi-0.7.5.orig/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp strigi-0.7.5/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp +--- strigi-0.7.5.orig/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp 2011-06-02 11:29:26.000000000 +0200 ++++ strigi-0.7.5/libstreamanalyzer/plugins/endplugins/ffmpegendanalyzer.cpp 2011-08-02 23:25:04.936181179 +0200 +@@ -1,6 +1,7 @@ + /* This file is part of Strigi Desktop Search + * + * Copyright (C) 2010 Evgeny Egorochkin ++ * Copyright (C) 2011 Tirtha Chatterjee + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -348,7 +349,7 @@ + if ((size = in->size()) >= 0) + ar.addValue(factory->durationProperty, (uint32_t)(size/(fc->bit_rate/8))); + } +- if(fc->nb_streams==1 && fc->streams[0]->codec->codec_type == CODEC_TYPE_AUDIO) { ++ if(fc->nb_streams==1 && fc->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { + ar.addValue(factory->typeProperty, NFO "Audio"); + ar.addValue(factory->typeProperty, NMM_DRAFT "MusicPiece"); + } else { +@@ -359,7 +360,7 @@ + const AVStream &stream = *fc->streams[i]; + const AVCodecContext &codec = *stream.codec; + +- if (codec.codec_type == CODEC_TYPE_AUDIO || codec.codec_type == CODEC_TYPE_VIDEO) { ++ if (codec.codec_type == AVMEDIA_TYPE_AUDIO || codec.codec_type == AVMEDIA_TYPE_VIDEO) { + const string streamuri = ar.newAnonymousUri(); + ar.addValue(factory->hasPartProperty, streamuri); + ar.addTriplet(streamuri, partOfPropertyName, ar.path()); +@@ -370,8 +371,16 @@ + outs << (stream.duration * stream.time_base.num / stream.time_base.den); + ar.addTriplet(streamuri, durationPropertyName,outs.str()); + } +- if (size_t len = strlen(stream.language)) { +- ar.addTriplet(streamuri, languagePropertyName, string(stream.language, len)); ++ ++ //FIXME we must stop using the deprecated fuction av_metadata_get and use ++ // av_dict_get once we are able to detect the version of FFMpeg being used ++ // using version macros. same goes for all occurences of this function. ++ AVMetadataTag *entry = av_metadata_get(stream.metadata, "language", NULL, 0); ++ if (entry != NULL) { ++ const char *languageValue = entry->value; ++ if (size_t len = strlen(languageValue)) { ++ ar.addTriplet(streamuri, languagePropertyName, string(languageValue, len)); ++ } + } + const AVCodec *p = avcodec_find_decoder(codec.codec_id); + if (p) { +@@ -408,7 +417,7 @@ + ar.addTriplet(streamuri, bitratePropertyName, outs.str()); + } + +- if (codec.codec_type == CODEC_TYPE_AUDIO) { ++ if (codec.codec_type == AVMEDIA_TYPE_AUDIO) { + + ar.addTriplet(streamuri, typePropertyName, audioClassName); + if (codec.channels) { +@@ -458,36 +467,83 @@ + } + + // Tags +- +- if (int32_t len = strlen(fc->title)) { +- ar.addValue(factory->titleProperty, string(fc->title, len) ); ++ ++ AVMetadataTag *entry = av_metadata_get(fc->metadata, "title", NULL, 0); ++ if (entry != NULL) ++ { ++ const char *titleValue = entry->value; ++ if (int32_t len = strlen(titleValue)) { ++ ar.addValue(factory->titleProperty, string(titleValue, len) ); ++ } ++ } ++ ++ entry = av_metadata_get(fc->metadata, "author", NULL, 0); ++ if (entry != NULL) ++ { ++ const char *authorValue = entry->value; ++ if (int32_t len = strlen(authorValue)) { ++ const string creatoruri = ar.newAnonymousUri(); ++ ar.addValue(factory->creatorProperty, creatoruri); ++ ar.addTriplet(creatoruri, typePropertyName, contactClassName); ++ ar.addTriplet(creatoruri, fullnamePropertyName, string(authorValue, len) ); ++ } ++ } ++ ++ entry = av_metadata_get(fc->metadata, "copyright", NULL, 0); ++ if (entry != NULL) ++ { ++ const char *copyrightValue = entry->value; ++ if (int32_t len = strlen(copyrightValue)) { ++ ar.addValue(factory->copyrightProperty, string(copyrightValue, len) ); ++ } + } +- if (int32_t len = strlen(fc->author)) { +- const string creatoruri = ar.newAnonymousUri(); +- ar.addValue(factory->creatorProperty, creatoruri); +- ar.addTriplet(creatoruri, typePropertyName, contactClassName); +- ar.addTriplet(creatoruri, fullnamePropertyName, string(fc->author, len) ); +- } +- if (int32_t len = strlen(fc->copyright)) { +- ar.addValue(factory->copyrightProperty, string(fc->copyright, len) ); +- } +- if (int32_t len = strlen(fc->comment)) { +- ar.addValue(factory->commentProperty, string(fc->comment, len) ); +- } +- if (int32_t len = strlen(fc->album)) { +- const string album = ar.newAnonymousUri(); +- ar.addValue(factory->albumProperty, album); ++ ++ entry = av_metadata_get(fc->metadata, "comment", NULL, 0); ++ if (entry != NULL) ++ { ++ const char *commentValue = entry->value; ++ if (int32_t len = strlen(commentValue)) { ++ ar.addValue(factory->commentProperty, string(commentValue, len) ); ++ } ++ } ++ ++ entry = av_metadata_get(fc->metadata, "album", NULL, 0); ++ if (entry != NULL) ++ { ++ const char *albumValue = entry->value; ++ if (int32_t len = strlen(albumValue)) { ++ const string album = ar.newAnonymousUri(); ++ ar.addValue(factory->albumProperty, album); + ar.addTriplet(album, typePropertyName, albumClassName); +- ar.addTriplet(album, titlePropertyName, string(fc->album, len) ); ++ ar.addTriplet(album, titlePropertyName, string(albumValue, len) ); ++ } + } +- if (int32_t len = strlen(fc->genre)) { +- ar.addValue(factory->genreProperty, string(fc->genre, len) ); ++ ++ entry = av_metadata_get(fc->metadata, "genre", NULL, 0); ++ if (entry != NULL) ++ { ++ const char *genreValue = entry->value; ++ if (int32_t len = strlen(genreValue)) { ++ ar.addValue(factory->genreProperty, string(genreValue, len) ); ++ } + } +- if (fc->track) { +- ar.addValue(factory->trackProperty, fc->track); ++ ++ entry = av_metadata_get(fc->metadata, "track", NULL, 0); ++ if (entry != NULL) ++ { ++ const char *trackValue = entry->value; ++ if (int32_t len = strlen(trackValue)) { ++ ar.addValue(factory->trackProperty, string(trackValue, len) ); ++ } + } +- if (fc->year) { +- ar.addValue(factory->createdProperty, fc->year); ++ ++ entry = av_metadata_get(fc->metadata, "year", NULL, 0); ++ if (entry != NULL) ++ { ++ const char *yearValue = entry->value; ++ if (int32_t len = strlen(yearValue)) { ++ ar.addValue(factory->createdProperty, string(yearValue, len) ); ++ } + } + + av_close_input_stream(fc); diff --git a/strigi-0.7.5-gcc-4.7.patch b/strigi-0.7.5-gcc-4.7.patch new file mode 100644 index 0000000..53296a0 --- /dev/null +++ b/strigi-0.7.5-gcc-4.7.patch @@ -0,0 +1,11 @@ +diff -ru strigi-0.7.5.orig/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp strigi-0.7.5/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp +--- strigi-0.7.5.orig/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp 2011-04-23 13:55:09.000000000 +0200 ++++ strigi-0.7.5/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp 2012-07-17 12:08:13.209035580 +0200 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #if defined(__SUNPRO_CC) + #include diff --git a/strigi.spec b/strigi.spec new file mode 100644 index 0000000..3701540 --- /dev/null +++ b/strigi.spec @@ -0,0 +1,207 @@ +Name: strigi +Version: 0.7.8 +Release: 1mamba +Summary: The fastest and smallest desktop searching program +Group: Applications/Databases +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://strigi.sourceforge.net +Source: http://www.vandenoever.info/software/strigi/strigi-%{version}.tar.bz2 +#Source: http://rdieter.fedorapeople.org/strigi/strigi-%{version}.tar.bz2 +Patch0: %{name}-0.7.5-ffmpeg.patch +Patch1: %{name}-0.7.5-gcc-4.7.patch +License: LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libbzip2-devel +BuildRequires: libclucene-devel +BuildRequires: libdbus-devel +BuildRequires: libgcc +BuildRequires: libqt4-devel +BuildRequires: libstdc++6-devel +BuildRequires: libxml2-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END +BuildRequires: cmake +BuildRequires: libbzip2-devel +BuildRequires: libexpat-devel +BuildRequires: libclucene-devel >= 2.3.3.4 +BuildRequires: libX11-devel +BuildRequires: libXext-devel +BuildRequires: libICE-devel +BuildRequires: libcppunit-devel +BuildRequires: libxml2-devel +BuildRequires: libdbus-devel +BuildRequires: libqt4-devel +BuildRequires: libmagic-devel +BuildRequires: libexiv2-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +# FIXME: +# ** HyperEstraier is disabled. No support for HyperEstraier backend +# ** SQLite is disabled. No support for SQLite backend +# ** Log4cxx is disabled. No support for advanced logging + +%description +Strigi is a daemon which uses a very fast and efficient crawler that can index data on your harddrive. +It indexes within archives like zip files, and calculates a hash for each file, so it can easily detect duplicates. + +%package devel +Summary: Development files for applications which use strigi +Group: Development/Libraries +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +Strigi is a daemon which uses a very fast and efficient crawler that can index data on your harddrive. +It indexes within archives like zip files, and calculates a hash for each file, so it can easily detect duplicates. +This package contains the libmagic library. + +%prep +%setup -q +#%patch0 -p1 +%patch1 -p1 + +QTDIR=%{_libdir}/qt4 +PATH=$QTDIR/bin:$PATH +cmake \ + -DCMAKE_CXXFLAGS="%{optflags}" \ + -DCMAKE_CFLAGS="%{optflags}" \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ +%ifarch x86_64 + -DLIB_SUFFIX=64 \ +%endif + -DENABLE_INOTIFY:BOOL=ON \ + -DENABLE_DBUS:BOOL=ON + +%build +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/deepfind +%{_bindir}/deepgrep +%{_bindir}/lucene2indexer +%{_bindir}/rdfindexer +%{_bindir}/strigiclient +%{_bindir}/strigicmd +%{_bindir}/strigidaemon +%{_bindir}/xmlindexer +%{_datadir}/dbus-1/services/*.service +%{_datadir}/strigi/ +#%{_libdir}/libcluceneindex.so.* +%{_libdir}/libsearchclient.so.* +%{_libdir}/libstreamanalyzer.so.* +%{_libdir}/libstreams.so.* +%{_libdir}/libstrigihtmlgui.so.* +%{_libdir}/libstrigiqtdbusclient.so.* +%dir %{_libdir}/strigi +%{_libdir}/strigi/strigiea_jpeg.so +%{_libdir}/strigi/strigiea_digest.so +%{_libdir}/strigi/strigiea_ffmpeg.so +%{_libdir}/strigi/strigiea_riff.so +%{_libdir}/strigi/strigiindex_cluceneng.so +%{_libdir}/strigi/strigila_cpp.so +%{_libdir}/strigi/strigila_deb.so +%{_libdir}/strigi/strigila_namespaceharvester.so +%{_libdir}/strigi/strigila_xpm.so +%{_libdir}/strigi/strigita_au.so +%{_libdir}/strigi/strigita_avi.so +%{_libdir}/strigi/strigita_dds.so +%{_libdir}/strigi/strigita_gif.so +%{_libdir}/strigi/strigita_ico.so +%{_libdir}/strigi/strigita_pcx.so +%{_libdir}/strigi/strigita_rgb.so +%{_libdir}/strigi/strigita_sid.so +%{_libdir}/strigi/strigila_txt.so +%{_libdir}/strigi/strigita_wav.so +%{_libdir}/strigi/strigita_xbm.so +#%{_libdir}/strigi/StrigiConfig.cmake +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/strigi +%{_includedir}/strigi/* +%{_libdir}/libsearchclient.so +%{_libdir}/libstreamanalyzer.so +%{_libdir}/libstreams.so +%{_libdir}/libstrigihtmlgui.so +%{_libdir}/libstrigiqtdbusclient.so +%dir %{_libdir}/cmake/LibSearchClient +%{_libdir}/cmake/LibSearchClient/LibSearchClientConfig.cmake +%dir %{_libdir}/cmake/LibStreamAnalyzer +%{_libdir}/cmake/LibStreamAnalyzer/LibStreamAnalyzer*.cmake +%dir %{_libdir}/cmake/LibStreams +%{_libdir}/cmake/LibStreams/LibStreams*.cmake +%dir %{_libdir}/cmake/Strigi +%{_libdir}/cmake/Strigi/Strigi*.cmake +%{_libdir}/pkgconfig/libstreamanalyzer.pc +%{_libdir}/pkgconfig/libstreams.pc +%doc NEWS ChangeLog + +%changelog +* Mon Feb 18 2013 Automatic Build System 0.7.8-1mamba +- update to 0.7.8 + +* Sat Nov 10 2012 Silvan Calarco 0.7.7-2mamba +- rebuilt with libkexiv2 4.9.3 + +* Tue Jul 17 2012 Silvan Calarco 0.7.7-1mamba +- update to 0.7.7 +- rebuilt with libclucene 2.3.3.4 + +* Wed Nov 30 2011 Silvan Calarco 0.7.5-2mamba +- rebuilt with ffmpeg 0.8 (added patch) + +* Wed Jun 29 2011 Automatic Build System 0.7.5-1mamba +- automatic update by autodist + +* Sat Apr 17 2010 Automatic Build System 0.7.2-1mamba +- automatic update by autodist + +* Mon Jan 18 2010 Automatic Build System 0.7.1-1mamba +- automatic update by autodist + +* Tue Aug 04 2009 Automatic Build System 0.7.0-1mamba +- automatic update by autodist + +* Fri May 08 2009 Automatic Build System 0.6.5-1mamba +- automatic update by autodist + +* Fri Mar 27 2009 Silvan Calarco 0.6.4-1mamba +- automatic update by autodist + +* Tue Jan 20 2009 Silvan Calarco 0.6.3-1mamba +- automatic update by autodist + +* Thu Aug 28 2008 Aleph0 0.5.11-1mamba +- update to 0.5.11 + +* Fri May 30 2008 Aleph0 0.5.9-1mamba +- update to 0.5.9 + +* Mon Oct 29 2007 Aleph0 0.5.7-1mamba +- update to 0.5.7 + +* Tue Aug 28 2007 Aleph0 0.5.5-1mamba +- update to 0.5.5 + +* Mon May 21 2007 Aleph0 0.5.1-1mamba +- update to 0.5.1 +- fixed package group +- own strigi directories +- update ldconfig cache + +* Sun Jan 28 2007 Silvan Calarco 0.3.11-1qilnx +- package created by autospec