Skip to content
Snippets Groups Projects
Commit fd1af9eb authored by Julien Leduc's avatar Julien Leduc
Browse files

Adding initial spec file for cta_eos_wfe_scripts will be merged later in

cta.spec.in when we agree on content
parent 6529bc03
No related branches found
No related tags found
No related merge requests found
SPECFILE = $(shell find -maxdepth 1 -type f -name *.spec)
PACKAGE = $(shell awk '$$1 == "Name:" { print $$2 }' $(SPECFILE) )
VERSION = $(shell awk '$$1 == "Version:" { print $$2 }' $(SPECFILE) )
RELEASE = $(shell awk '$$1 == "Release:" { print $$2 }' $(SPECFILE) )
TARFILE = $(PACKAGE)-$(VERSION).tar.gz
RPMTOPDIR = $(shell rpm --eval '%{_topdir}')
BUILDARCH = $(shell awk '$$1 == "BuildArch:" { print $$2 }' $(SPECFILE) )
BUILTRPM = $(RPMTOPDIR)/RPMS/$(BUILDARCH)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(BUILDARCH).rpm
all: $(TARFILE)
$(TARFILE):
tar cvzf $(TARFILE) --hard-dereference --dereference --exclude-vcs --transform 's,^,$(PACKAGE)-$(VERSION)/,' *
clean:
rm $(TARFILE)
build: $(TARFILE) $(SPECFILE)
mv $(TARFILE) $(RPMTOPDIR)/SOURCES
rpmbuild -ba $(SPECFILE)
deb_build: build
sudo alien $(BUILTRPM) --scripts -k
Summary: CERN Tape Archive workflow scripts for EOS
Name: cta_eos_wfe_scripts
Version: 0.1
Release: 1
License: GPL
Group: Applications/System
Buildroot: %{_tmppath}/%{name}-%{version}
Source: %{name}-%{version}.tar.gz
Group: Applications/System
BuildArch: noarch
requires: eos-server
%description
eos_wfe_scripts contains all the workflows needed for archival from EOS to CTA and for retrieva from CTA to EOS.
This version contains all the file for the so called *preproduction* workflows.
%prep
%setup -n %{name}-%{version}
%build
%install
[ -d %{buildroot} ] && rm -rf %{buildroot}
mkdir -p %{buildroot}/var/eos/wfe/bash
install -m 755 create_tape_drop_disk_replicas %{buildroot}/var/eos/wfe/bash/create_tape_drop_disk_replicas
install -m 755 delete_archive_file %{buildroot}/var/eos/wfe/bash/delete_archive_file
install -m 755 retrieve_archive_file %{buildroot}/var/eos/wfe/bash/retrieve_archive_file
%clean
rm -rf %{buildroot}
%files
%defattr(-,daemon,daemon)
/var/eos/wfe/bash/create_tape_drop_disk_replicas
/var/eos/wfe/bash/delete_archive_file
/var/eos/wfe/bash/retrieve_archive_file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment