From 65eb9146a662935e045f9dbe05d18682e57bec6c Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 15 May 2009 23:51:59 +0000 Subject: [PATCH 1/9] Initialize branch EL-5 for wannier90 --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..42f697a --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-5 From 8da0197b7a44c4422358b813c720e3aba331ec6d Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Sat, 16 May 2009 07:53:38 +0000 Subject: [PATCH 2/9] Imported in Fedora --- sources | 1 + wannier90-1.1-shlib.patch | 25 +++++++++ wannier90.spec | 105 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100644 wannier90-1.1-shlib.patch create mode 100644 wannier90.spec diff --git a/sources b/sources index e69de29..a9265c1 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +2a547276e25d2345480ec3717c6c2f3f wannier90-1.1.tar.gz diff --git a/wannier90-1.1-shlib.patch b/wannier90-1.1-shlib.patch new file mode 100644 index 0000000..09c4089 --- /dev/null +++ b/wannier90-1.1-shlib.patch @@ -0,0 +1,25 @@ +diff -up wannier90-1.1/src/Makefile.orig wannier90-1.1/src/Makefile +--- wannier90-1.1/src/Makefile.orig 2007-08-22 19:22:27.000000000 +0300 ++++ wannier90-1.1/src/Makefile 2009-05-15 15:36:00.000000000 +0300 +@@ -8,16 +8,15 @@ OBJS = constants.o io.o utility.o para + + OBJS2 = wannier_lib.o + +-LIBRARY = ../libwannier.a ++LIBRARY = ../libwannier.so + +-prog: $(OBJS) +- $(F90) wannier_prog.F90 $(LDOPTS) $(OBJS) $(LIBS) -o ../wannier90.x ++prog: $(LIBRARY) ++ $(F90) wannier_prog.F90 $(LDOPTS) -L.. -lwannier $(LIBS) -o ../wannier90.x + + libs: $(LIBRARY) + +-$(LIBRARY): $(OBJS) $(OBJS2) +- $(AR) $(ARFLAGS) $(LIBRARY) $(OBJS2) $(OBJS) +- ++$(LIBRARY): $(OBJS) $(OBJS2) ++ $(F90) $(FCOPTS) -shared -o $(LIBRARY) $(OBJS2) $(OBJS) + + + clean: diff --git a/wannier90.spec b/wannier90.spec new file mode 100644 index 0000000..3e6a254 --- /dev/null +++ b/wannier90.spec @@ -0,0 +1,105 @@ +Name: wannier90 +Version: 1.1 +Release: 3%{?dist} +Summary: Maximally-localised Wannier functions +Group: Applications/Engineering +License: GPLv2+ +URL: http://wannier.org/ +Source0: http://quasiamore.mit.edu/wannier/code/wannier90-%{version}.tar.gz +# Patch to enable building of shared library +Patch0: wannier90-1.1-shlib.patch +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +BuildRequires: gcc-gfortran +BuildRequires: lapack-devel +# For test phase +BuildRequires: perl(Cwd) + +%description +Wannier90 is a program for calculating maximally-localised Wannier functions +(MLWF) from a set of Bloch energy bands that may or may not be attached to or +mixed with other bands. The formalism works by minimising the total spread of +the MLWF in real space. This is done in the space of unitary matrices that +describe rotations of the Bloch bands at each k-point. As a result, wannier90 +is independent of the basis set used in the underlying calculation to obtain +the Bloch states. Therefore, it may be interfaced straightforwardly to any +electronic structure code. The locality of MLWF can be exploited to compute +band-structure, density of states and Fermi surfaces at modest computational +cost. + +Furthermore, wannier90 is able to output MLWF for visualisation and other +post-processing purposes. Wannier functions are already used in a wide variety +of applications. These include analysis of chemical bonding in real space; +calculation of dielectric properties via the modern theory of polarisation; +and as an accurate and minimal basis set in the construction of model +Hamiltonians for large-scale systems, in linear-scaling quantum Monte Carlo +calculations, and for efficient computation of material properties, such as +the anomalous Hall coefficient. + +%package devel +Summary: Development modules for Wannier90 +Group: Development/Languages +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains Fortran modules for Wannier90. + +%prep +%setup -q +%patch0 -p1 + +# Remove executable flag from utility that is included in doc +chmod 644 utility/kmesh.pl + +%build +# Generate make.sys +echo "F90 = gfortran" > make.sys +echo "FCOPTS = %{optflags} -fPIC" >> make.sys +echo "LDOPTS = %{optflags} -fPIC" >> make.sys +echo "LIBS = -lblas -llapack" >> make.sys + +make -C src %{?_smp_mflags} prog + +%install +rm -rf %{buildroot} +# Binary & library +install -D -p -m 755 wannier90.x %{buildroot}%{_bindir}/wannier90.x +# Must install as executable so that find-debuginfo catches this +install -D -p -m 755 libwannier.so %{buildroot}%{_libdir}/libwannier.so + +# Fortran module files +mkdir -p %{buildroot}%{_includedir}/%{name} +install -p -m 644 src/*.mod %{buildroot}%{_includedir}/%{name}/ + + +%clean +rm -rf %{buildroot} + +%check +make test + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc CHANGE.log LICENCE README utility/ doc/*.pdf examples/ +%{_bindir}/wannier90.x +%{_libdir}/libwannier.so + +%files devel +%defattr(-,root,root,-) +%{_includedir}/%{name}/ + + +%changelog +* Tue Apr 21 2009 Jussi Lehtola - 1.1-3 +- Link binary against shared library. +- Put library back into main package. + +* Tue Apr 21 2009 Jussi Lehtola - 1.1-2 +- Break libs into own package. + +* Tue Apr 21 2009 Jussi Lehtola - 1.1-1 +- First release. From fe51d4f7ed791e7e91f451044888b4054baa090a Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Sat, 16 May 2009 08:06:23 +0000 Subject: [PATCH 3/9] Fix EPEL build. --- wannier90.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wannier90.spec b/wannier90.spec index 3e6a254..9881eb0 100644 --- a/wannier90.spec +++ b/wannier90.spec @@ -12,6 +12,8 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: gcc-gfortran BuildRequires: lapack-devel +# On Fedora this is pulled in by lapack-devel, but EPEL needs this +BuildRequires: blas-devel # For test phase BuildRequires: perl(Cwd) From 811d5aa547f5e760f7343d6aa7c8b3976ce990e7 Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Sat, 16 May 2009 08:10:57 +0000 Subject: [PATCH 4/9] Retry fixing epel build. --- wannier90.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wannier90.spec b/wannier90.spec index 9881eb0..db87240 100644 --- a/wannier90.spec +++ b/wannier90.spec @@ -1,6 +1,6 @@ Name: wannier90 Version: 1.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Maximally-localised Wannier functions Group: Applications/Engineering License: GPLv2+ @@ -96,7 +96,10 @@ make test %changelog -* Tue Apr 21 2009 Jussi Lehtola - 1.1-3 +* Sat May 16 2009 Jussi Lehtola - 1.1-4 +- Fix EPEL build by adding explicit BR: blas-devel. + +* Fri May 15 2009 Jussi Lehtola - 1.1-3 - Link binary against shared library. - Put library back into main package. From 98b9f7c2e8a632974b94f9aebb7e2fa7aeeb5e86 Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Wed, 16 Sep 2009 17:24:22 +0000 Subject: [PATCH 5/9] Fix location of Fortran modules. Use ATLAS instead of LAPACK. Fix test phase. --- wannier90.spec | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/wannier90.spec b/wannier90.spec index db87240..99288ca 100644 --- a/wannier90.spec +++ b/wannier90.spec @@ -1,6 +1,6 @@ Name: wannier90 Version: 1.1 -Release: 4%{?dist} +Release: 6%{?dist} Summary: Maximally-localised Wannier functions Group: Applications/Engineering License: GPLv2+ @@ -11,12 +11,17 @@ Patch0: wannier90-1.1-shlib.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: gcc-gfortran -BuildRequires: lapack-devel -# On Fedora this is pulled in by lapack-devel, but EPEL needs this -BuildRequires: blas-devel # For test phase BuildRequires: perl(Cwd) +# Linear algebra: use ATLAS +BuildRequires: atlas-devel + +# Reference LAPACK +#BuildRequires: lapack-devel +# On Fedora this is pulled in by lapack-devel, but EPEL needs this +#BuildRequires: blas-devel + %description Wannier90 is a program for calculating maximally-localised Wannier functions (MLWF) from a set of Bloch energy bands that may or may not be attached to or @@ -58,7 +63,11 @@ chmod 644 utility/kmesh.pl echo "F90 = gfortran" > make.sys echo "FCOPTS = %{optflags} -fPIC" >> make.sys echo "LDOPTS = %{optflags} -fPIC" >> make.sys -echo "LIBS = -lblas -llapack" >> make.sys + +# Use ATLAS +echo "LIBS = -L%{_libdir}/atlas -lf77blas -latlas -llapack" >> make.sys +# Use reference LAPACK +#echo "LIBS = -lblas -llapack" >> make.sys make -C src %{?_smp_mflags} prog @@ -70,14 +79,15 @@ install -D -p -m 755 wannier90.x %{buildroot}%{_bindir}/wannier90.x install -D -p -m 755 libwannier.so %{buildroot}%{_libdir}/libwannier.so # Fortran module files -mkdir -p %{buildroot}%{_includedir}/%{name} -install -p -m 644 src/*.mod %{buildroot}%{_includedir}/%{name}/ - +mkdir -p %{buildroot}%{_fmoddir} +install -p -m 644 src/*.mod %{buildroot}%{_fmoddir}/ %clean rm -rf %{buildroot} %check +# Set path so that wannier finds its library +export LD_LIBRARY_PATH=`pwd` make test %post -p /sbin/ldconfig @@ -92,19 +102,27 @@ make test %files devel %defattr(-,root,root,-) -%{_includedir}/%{name}/ +%{_fmoddir}/w90_*.mod %changelog -* Sat May 16 2009 Jussi Lehtola - 1.1-4 +* Wed Sep 16 2009 Jussi Lehtola - 1.1-6 +- Fix location of Fortran modules. +- Fix check phase. +- Use ATLAS instead of reference BLAS & LAPACK. + +* Mon Jul 27 2009 Fedora Release Engineering - 1.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sat May 16 2009 Jussi Lehtola - 1.1-4 - Fix EPEL build by adding explicit BR: blas-devel. -* Fri May 15 2009 Jussi Lehtola - 1.1-3 +* Fri May 15 2009 Jussi Lehtola - 1.1-3 - Link binary against shared library. - Put library back into main package. -* Tue Apr 21 2009 Jussi Lehtola - 1.1-2 +* Tue Apr 21 2009 Jussi Lehtola - 1.1-2 - Break libs into own package. -* Tue Apr 21 2009 Jussi Lehtola - 1.1-1 +* Tue Apr 21 2009 Jussi Lehtola - 1.1-1 - First release. From 47d1f2efb1cc151e40a6ec3d4793082780c714a8 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:15:14 +0000 Subject: [PATCH 6/9] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d718ce1..082fccf 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: wannier90 -# $Id$ +# $Id: Makefile,v 1.1 2009/05/15 23:51:55 kevin Exp $ NAME := wannier90 SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 64b98c54b4bc33b0fb4bb31a6a99cbab84a5a580 Mon Sep 17 00:00:00 2001 From: Jussi Lehtola Date: Wed, 27 Jan 2010 12:21:04 +0000 Subject: [PATCH 7/9] Update to 1.2. --- sources | 2 +- wannier90.spec | 43 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/sources b/sources index a9265c1..6777fa3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2a547276e25d2345480ec3717c6c2f3f wannier90-1.1.tar.gz +764165971f0ee35ff16041320c2cbc29 wannier90-1.2.tar.gz diff --git a/wannier90.spec b/wannier90.spec index 99288ca..8e9e78d 100644 --- a/wannier90.spec +++ b/wannier90.spec @@ -1,6 +1,6 @@ Name: wannier90 -Version: 1.1 -Release: 6%{?dist} +Version: 1.2 +Release: 1%{?dist} Summary: Maximally-localised Wannier functions Group: Applications/Engineering License: GPLv2+ @@ -17,10 +17,8 @@ BuildRequires: perl(Cwd) # Linear algebra: use ATLAS BuildRequires: atlas-devel -# Reference LAPACK -#BuildRequires: lapack-devel -# On Fedora this is pulled in by lapack-devel, but EPEL needs this -#BuildRequires: blas-devel +# For documentation +BuildRequires: tex(latex) %description Wannier90 is a program for calculating maximally-localised Wannier functions @@ -51,12 +49,28 @@ Requires: %{name} = %{version}-%{release} %description devel This package contains Fortran modules for Wannier90. +%package doc +Summary: Documentation for Wannier90 +Group: Documentation +%if 0%{?fedora} > 10 || 0%{?rhel} > 5 +BuildArch: noarch +%endif + +%description doc +This package contains the tutorial and user's guide for Wannier90. + + %prep %setup -q -%patch0 -p1 - +%patch0 -p1 -b .sharedlib # Remove executable flag from utility that is included in doc chmod 644 utility/kmesh.pl +# Convert documentation +for file in CHANGE.log; do + sed "s|\r||g" $file > $file.new && \ + touch -r $file $file.new && \ + mv $file.new $file +done %build # Generate make.sys @@ -71,6 +85,11 @@ echo "LIBS = -L%{_libdir}/atlas -lf77blas -latlas -llapack" >> make.sys make -C src %{?_smp_mflags} prog +# Build documentation +make -C doc/user_guide +make -C doc/tutorial + + %install rm -rf %{buildroot} # Binary & library @@ -96,7 +115,7 @@ make test %files %defattr(-,root,root,-) -%doc CHANGE.log LICENCE README utility/ doc/*.pdf examples/ +%doc CHANGE.log LICENCE README utility/ examples/ %{_bindir}/wannier90.x %{_libdir}/libwannier.so @@ -104,8 +123,14 @@ make test %defattr(-,root,root,-) %{_fmoddir}/w90_*.mod +%files doc +%defattr(-,root,root,-) +%doc doc/tutorial.pdf doc/user_guide.pdf %changelog +* Wed Jan 27 2010 Jussi Lehtola - 1.2-1 +- Update to 1.2. + * Wed Sep 16 2009 Jussi Lehtola - 1.1-6 - Fix location of Fortran modules. - Fix check phase. From a8a336800abd99c736609b98c767988567bde948 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 15:12:23 +0000 Subject: [PATCH 8/9] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 082fccf..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: wannier90 -# $Id: Makefile,v 1.1 2009/05/15 23:51:55 kevin Exp $ -NAME := wannier90 -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 42f697a..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-5 From a14139b146cb5a263b65c314dcd8dcd1d73f7bee Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Tue, 15 Oct 2013 15:11:17 +0300 Subject: [PATCH 9/9] Update to 2.0.0. --- .gitignore | 2 -- sources | 4 ---- 2 files changed, 6 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e343e2c..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -wannier90-1.2.tar.gz -/wannier90-2.0.0.tar.gz diff --git a/sources b/sources index 5771980..96647eb 100644 --- a/sources +++ b/sources @@ -1,5 +1 @@ -<<<<<<< HEAD -764165971f0ee35ff16041320c2cbc29 wannier90-1.2.tar.gz -======= c5e120daa414ab6546bdd549675a23e8 wannier90-2.0.0.tar.gz ->>>>>>> master