diff --git a/.mrconfig b/.mrconfig index a4957d9..144bfd9 100644 --- a/.mrconfig +++ b/.mrconfig @@ -1,12 +1,11 @@ -[.] +[solr] +checkout = utils/downloadsource.sh http://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz solr http://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz.md5 [colab] -checkout = git clone https://github.com/colab-community/colab.git - --branch dev_gitlab +checkout = git clone https://github.com/colab-community/colab.git --branch stable_spb [doc/colabdocumentation] checkout = git clone https://gitlab.com/softwarepublico/colabdocumentation.git [redmine] -checkout = git clone https://github.com/redmine/redmine.git - --branch 2.5-stable +checkout = git clone https://github.com/redmine/redmine.git --branch 2.5-stable diff --git a/Makefile b/Makefile index b52a711..3cf5b69 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ PROJECT = softwarepublico VERSION = 2014.07 -COMPONENTS = colab +COMPONENTS = solr +ARCH = $(shell uname -i) TARBALL_FORMAT = tar.gz TARBALLS = $(patsubst %,build/$(PROJECT)-%-$(VERSION).$(TARBALL_FORMAT),$(COMPONENTS)) RPMS = $(patsubst %.$(TARBALL_FORMAT),%-1.$(ARCH).rpm, $(TARBALLS)) GENERATED += $(TARBALLS) $(RPMS) -ARCH = $(shell uname -m) ifeq ("$(V)", "1") Q := @@ -38,7 +38,7 @@ $(RPMS): build/$(PROJECT)-%-$(VERSION)-1.$(ARCH).rpm: rpm/%.spec $(Q)component=$$(basename $< .spec) && \ ln -f build/$(PROJECT)-$$component-$(VERSION).$(TARBALL_FORMAT) ~/rpmbuild/SOURCES/ && \ rpmbuild -bb $(RPMBUILD_FLAGS) $< && \ - ln -f ~/rpmbuild/RPMS/$(ARCH)/$(PROJECT)-$$component-$(VERSION)-1.$(ARCH).rpm $@ + ln -f ~/rpmbuild/RPMS/$(ARCH)/$(PROJECT)-$$component-$(VERSION)-1.el6.$(ARCH).rpm $@ %.spec: %.spec.in $(qecho) "SPEC\t$@" diff --git a/rpm/colab.spec.in b/rpm/colab.spec.in index d282e0a..75fa577 100644 --- a/rpm/colab.spec.in +++ b/rpm/colab.spec.in @@ -9,7 +9,7 @@ Source: %{name}-%{version}.tar.gz %description %prep -%autosetup +%setup %build # nothing really diff --git a/rpm/solr.spec.in b/rpm/solr.spec.in new file mode 100644 index 0000000..29d0890 --- /dev/null +++ b/rpm/solr.spec.in @@ -0,0 +1,53 @@ +# +# Spec file do solr +# + +# Preamble + +Summary: Solr is the search platform from Apache Lucene project. +Name: sofwarepublico-solr +Version: @@version@@ +Release: 1%{?dist} + +License: Apache License, Version 2.0 +Group: Applications/Internet +Source: %{name}-%{version}.tar.gz +#Source: http://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz +URL: http://lucene.apache.org/solr/ +Vendor: The Apache Software Foundation + +%description +SolrTM is the popular, blazing fast open source enterprise search platform from the Apache LuceneTM project. Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites. + +# Esta seção prepara o ambiente para a construção do pacote. Pode ser +# entendida como um shell script, e é o local onde podem ser aplicados +# os patches +%prep + +# A macro %setup prepara o ambiente, de forma semelhante aos comandos abaixo: +# rm -rf $RPM_BUILD_DIR/cdp-0.33 +# zcat $RPM_SOURCE_DIR/cdp-0.33.tar.gz | tar vxf - +%setup + +# Esta é a seção responsável pela construção do software. Também é um +# shell script, e não tem macros associadas +%build +make + +# Seção responsável pela instalação do software. Também é um shell script +%install +make install + +# Esta seção lista todos os arquivos que fazem parte do pacote: se um +# arquivo não for listado abaixo, não será inserido no pacote. A diretiva +# %doc indica um arquivo de documentação +%files +%doc README +/usr/local/bin/cdp +/usr/local/bin/cdplay +/usr/local/man/man1/cdp.1 + +# Esta seção remove os arquivos que foram criados durante o build +%clean +rm -rf %{buildroot} + diff --git a/utils/downloadsource.sh b/utils/downloadsource.sh new file mode 100755 index 0000000..cd7a514 --- /dev/null +++ b/utils/downloadsource.sh @@ -0,0 +1,39 @@ +# !/bin/bash +if [ $# -lt 3 ]; +then + echo "Usage: $0 {link} {destdir} {md5sum}" + exit -1 +fi + +link=$1 +dest=$2 +checksum=$3 +packdir=packages + +fname=`basename $link` +cname=`basename $checksum` + +if [ ! -f $packdir/$fname ]; +then + wget $link -O $dest/$fname +fi + +if [ ! -f $packdir/$cname ]; +then + wget $checksum -O $packdir/$cname +fi + + +cd $packdir + +if ! md5sum -c $cname; +then + echo "$fname is corrupted!" + exit -2 +fi + +cd .. + +mkdir -p $dest +tar vxzf $packdir/$fname -C $dest --strip-components=1 + -- libgit2 0.21.2