From f068d9d0b3c79a08cfb4528c4568febeadbd38f5 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Fri, 4 Mar 2011 17:16:45 +0300 Subject: [PATCH 1/6] Initial import (#675388) --- .gitignore | 1 + sources | 1 + xmlada-destdir.patch | 152 +++++++++++++++++++++++++++++++++++++++++ xmlada-gnatflags.patch | 19 ++++++ xmlada-gpr.patch | 97 ++++++++++++++++++++++++++ xmlada.spec | 132 +++++++++++++++++++++++++++++++++++ 6 files changed, 402 insertions(+) create mode 100644 xmlada-destdir.patch create mode 100644 xmlada-gnatflags.patch create mode 100644 xmlada-gpr.patch create mode 100644 xmlada.spec diff --git a/.gitignore b/.gitignore index e69de29..38da341 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/xmlada-gpl-3.2.1-src.tgz diff --git a/sources b/sources index e69de29..68d590f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f52e66adee5cdf7d8b7c7454d0cbc196 xmlada-gpl-3.2.1-src.tgz diff --git a/xmlada-destdir.patch b/xmlada-destdir.patch new file mode 100644 index 0000000..cb68ecd --- /dev/null +++ b/xmlada-destdir.patch @@ -0,0 +1,152 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,8 +1,8 @@ + ## The type of library we want to build. Possible values: + ## relocatable + ## static +-LIBRARY_TYPE=static +- ++LIBRARY_TYPE=relocatable ++DESTDIR ?= + # Replace with the location for the installation directory + INSTALL=@INSTALL@ + PACKAGE_TARNAME=@PACKAGE_TARNAME@ +@@ -50,8 +50,8 @@ + .PHONY: all obj clean install install_dirs build_library_type install_library_type + + ifeq (${BUILDS_SHARED},yes) +-all: static relocatable +-install: install_static install_relocatable ++all: relocatable ++install: install_relocatable + else + all: static + install: install_static +@@ -64,17 +64,17 @@ + ${MAKE} LIBRARY_TYPE=relocatable build_library_type + + obj: force +- ${GNATMAKE} -p -Punicode/unicode.gpr ${MAKE_ARGS} +- ${GNATMAKE} -p -Pinput_sources/input_sources.gpr ${MAKE_ARGS} +- ${GNATMAKE} -p -Psax/sax.gpr ${MAKE_ARGS} +- ${GNATMAKE} -p -Pdom/dom.gpr ${MAKE_ARGS} +- ${GNATMAKE} -p -Pschema/schema.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Punicode/unicode.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Pinput_sources/input_sources.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Psax/sax.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Pdom/dom.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Pschema/schema.gpr ${MAKE_ARGS} + + test: force +- ${GNATMAKE} -p -Punicode/test/unicode_test.gpr ${MAKE_ARGS} +- ${GNATMAKE} -p -Psax/test/sax_test.gpr ${MAKE_ARGS} +- ${GNATMAKE} -p -Pdom/test/dom_test.gpr ${MAKE_ARGS} +- ${GNATMAKE} -p -Pschema/test/schema_test.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Punicode/test/unicode_test.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Psax/test/sax_test.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Pdom/test/dom_test.gpr ${MAKE_ARGS} ++ ${GNATMAKE} -R -p -Pschema/test/schema_test.gpr ${MAKE_ARGS} + + run_test: force + @cd unicode/test; ./test_unicode +@@ -88,57 +88,55 @@ + + # Rule for installing the modules + %_inst: force +- ${CP} $*/*.ad[bs] ${includedir}/xmlada +- cd $*; ls *.ad[bs] > ${libdir}/gnat/xmlada/xmlada_$*.lgpr +- -cd ${xmllib}; ${CHMOD} ugo+w *.ali +- -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${xmllib} +- ${RM} ${libdir}/libxmlada_$** +- ${RM} ${xmllib}libxmlada_$** ++ ${CP} $*/*.ad[bs] ${DESTDIR}/${includedir}/xmlada ++ cd $*; ls *.ad[bs] > ${DESTDIR}/${ADA_PROJECT_PATH}/xmlada/xmlada_$*.lgpr ++ -cd ${DESTDIR}/${xmllib}; ${CHMOD} ugo+w *.ali ++ -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${DESTDIR}/${xmllib} ++ ${RM} ${DESTDIR}/${libdir}/libxmlada_$** ++ ${RM} ${DESTDIR}/${xmllib}libxmlada_$** + ifeq (${LIBRARY_TYPE},static) +- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${xmllib} ++ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${DESTDIR}/${xmllib} + else + ifeq (${OS},Windows_NT) +- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} ${xmllib} ++ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} ${DESTDIR}/${xmllib} + cd ${bindir}; ${CP} ${libdir}/xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} libxmlada_$*.${LIBEXT} + else +- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} ${xmllib} +- cd ${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT} +- cd ${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} +- cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} +- cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${VERSION} ++ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} ${DESTDIR}/${xmllib} ++ cd ${DESTDIR}/${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT} ++ cd ${DESTDIR}/${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} ++ cd ${DESTDIR}/${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} ++ cd ${DESTDIR}/${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${VERSION} + endif + endif +- cd ${xmllib}; ${CHMOD} ugo-w *.ali ++ cd ${DESTDIR}/${xmllib}; ${CHMOD} ugo-w *.ali + + install_dirs: force +- @${MKDIR} ${bindir} +- @${MKDIR} ${xmllib} +- @${MKDIR} ${libdir}/gnat/xmlada +- @${MKDIR} ${datadir}/doc/xmlada +- @${MKDIR} ${includedir}/xmlada +- @${MKDIR} ${datadir}/gps/plug-ins/ ++ @${MKDIR} ${DESTDIR}/${bindir} ++ @${MKDIR} ${DESTDIR}/${xmllib} ++ @${MKDIR} ${DESTDIR}/${ADA_PROJECT_PATH}/xmlada ++ @${MKDIR} ${DESTDIR}/${datadir}/doc/xmlada ++ @${MKDIR} ${DESTDIR}/${includedir}/xmlada ++ @${MKDIR} ${DESTDIR}/${datadir}/gps/plug-ins/ + + ## Do the installation for either shared or static, depending on + ## $LIBRARY_TYPE + install_library_type: install_dirs ${MODULE_INSTALL} +- ${INSTALL} distrib/xmlada_shared.gpr ${libdir}/gnat +- ${INSTALL} distrib/xmlada.gpr ${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_dom.gpr ${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_sax.gpr ${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_input.gpr ${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_schema.gpr ${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_unicode.gpr ${libdir}/gnat/ +- ${INSTALL} xmlada-config ${bindir} +- -${INSTALL} docs/xml.ps ${datadir}/doc/xmlada 2>/dev/null +- -${INSTALL} docs/xml.pdf ${datadir}/doc/xmlada +- -${INSTALL} docs/xml.html ${datadir}/doc/xmlada +- -${INSTALL} docs/xml.info ${datadir}/doc/xmlada +- ${CHMOD} +x ${bindir}/xmlada-config +- ${INSTALL} distrib/xmlada_gps.py ${datadir}/gps/plug-ins/ ++ ${INSTALL} distrib/xmlada_shared.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_dom.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_sax.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_input.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_schema.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_unicode.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} xmlada-config ${DESTDIR}/${bindir} ++ -${INSTALL} docs/xml.ps ${DESTDIR}/${datadir}/doc/xmlada 2>/dev/null ++ -${INSTALL} docs/xml.pdf ${DESTDIR}/${datadir}/doc/xmlada ++ -${INSTALL} docs/xml.html ${DESTDIR}/${datadir}/doc/xmlada ++ -${INSTALL} docs/xml.info ${DESTDIR}/${datadir}/doc/xmlada ++ ${CHMOD} +x ${DESTDIR}/${bindir}/xmlada-config ++ ${INSTALL} distrib/xmlada_gps.py ${DESTDIR}/${datadir}/gps/plug-ins/ + + ## Do the installation for an explicit target +-install_static: +- ${MAKE} LIBRARY_TYPE=static install_library_type + install_shared install_relocatable: + ${MAKE} LIBRARY_TYPE=relocatable install_library_type + +@@ -153,7 +151,7 @@ + -gnat clean -XLIBRARY_TYPE=$* -q -Psax/test/sax_test.gpr + -gnat clean -XLIBRARY_TYPE=$* -q -Pschema/test/schema_test.gpr + +-clean: clean_relocatable clean_static ++clean: clean_relocatable + cd docs; ${MAKE} -e clean + + distclean: clean diff --git a/xmlada-gnatflags.patch b/xmlada-gnatflags.patch new file mode 100644 index 0000000..7120a49 --- /dev/null +++ b/xmlada-gnatflags.patch @@ -0,0 +1,19 @@ +--- a/Makefile.in 2011-02-20 17:55:26.420257717 +0300 ++++ b/Makefile.in 2011-02-20 17:56:13.768263891 +0300 +@@ -3,6 +3,7 @@ + ## static + LIBRARY_TYPE=relocatable + DESTDIR ?= ++GNATFLAGS ?= + # Replace with the location for the installation directory + INSTALL=@INSTALL@ + PACKAGE_TARNAME=@PACKAGE_TARNAME@ +@@ -18,7 +19,7 @@ + docdir=@docdir@ + includedir=@includedir@ + +-GNATMAKE=@gnatmake@ ++GNATMAKE=@gnatmake@ ${GNATFLAGS} + + # Compiler mode: one of "distrib", "debug", "optimize", "profile" + MODE=distrib diff --git a/xmlada-gpr.patch b/xmlada-gpr.patch new file mode 100644 index 0000000..fde55ea --- /dev/null +++ b/xmlada-gpr.patch @@ -0,0 +1,97 @@ +--- a/distrib/xmlada_dom.gpr 2011-03-01 12:18:26.928536602 +0300 ++++ b/distrib/xmlada_dom.gpr 2011-03-01 12:17:54.631541017 +0300 +@@ -1,12 +1,13 @@ ++with "directories"; + with "xmlada_shared"; + with "xmlada_sax"; + project XmlAda_Dom is + for Library_Name use "xmlada_dom"; + + for Library_Kind use Xmlada_Shared.Xmlada_Kind; +- for Source_Dirs use ("../../include/xmlada"); ++ for Source_Dirs use (Directories.Includedir & "/xmlada"); + for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; +- for Library_Dir use "../xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; + for Library_Version use + "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; + for Externally_Built use "true"; +--- a/distrib/xmlada_sax.gpr 2011-03-01 12:18:26.928536602 +0300 ++++ b/distrib/xmlada_sax.gpr 2011-03-01 12:17:54.633540891 +0300 +@@ -1,3 +1,4 @@ ++with "directories"; + with "xmlada_shared"; + with "xmlada_input"; + with "xmlada_unicode"; +@@ -5,9 +6,9 @@ + for Library_Name use "xmlada_sax"; + + for Library_Kind use Xmlada_Shared.Xmlada_Kind; +- for Source_Dirs use ("../../include/xmlada"); ++ for Source_Dirs use (Directories.Includedir & "/xmlada"); + for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; +- for Library_Dir use "../xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; + for Library_Version use + "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; + for Externally_Built use "true"; +--- a/distrib/xmlada_input.gpr 2011-03-01 12:18:26.928536602 +0300 ++++ b/distrib/xmlada_input.gpr 2011-03-01 12:17:54.632540953 +0300 +@@ -1,12 +1,13 @@ ++with "directories"; + with "xmlada_shared"; + with "xmlada_unicode"; + project XmlAda_Input is + for Library_Name use "xmlada_input_sources"; + + for Library_Kind use Xmlada_Shared.Xmlada_Kind; +- for Source_Dirs use ("../../include/xmlada"); ++ for Source_Dirs use (Directories.Includedir & "/xmlada"); + for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; +- for Library_Dir use "../xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; + for Library_Version use + "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; + for Externally_Built use "true"; +--- a/distrib/xmlada.gpr 2011-03-01 12:18:26.928536602 +0300 ++++ b/distrib/xmlada.gpr 2011-03-01 12:17:54.632540953 +0300 +@@ -1,3 +1,4 @@ ++with "directories"; + -- Project file for use of XML/Ada. + -- Put the directory that contains xmlada.gpr in your ADA_PROJECT_PATH + -- variable. Then, in our own project file, add a "with" dependency on +--- a/distrib/xmlada_schema.gpr 2011-03-01 12:18:26.928536602 +0300 ++++ b/distrib/xmlada_schema.gpr 2011-03-01 12:17:54.633540891 +0300 +@@ -1,12 +1,13 @@ ++with "directories"; + with "xmlada_shared"; + with "xmlada_dom"; + project XmlAda_Schema is + for Library_Name use "xmlada_schema"; + + for Library_Kind use Xmlada_Shared.Xmlada_Kind; +- for Source_Dirs use ("../../include/xmlada"); ++ for Source_Dirs use (Directories.Includedir & "/xmlada"); + for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; +- for Library_Dir use "../xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; + for Library_Version use + "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; + for Externally_Built use "true"; +--- a/distrib/xmlada_unicode.gpr 2011-03-01 12:18:26.928536602 +0300 ++++ b/distrib/xmlada_unicode.gpr 2011-03-01 12:17:54.633540891 +0300 +@@ -1,11 +1,12 @@ ++with "directories"; + with "xmlada_shared"; + project XmlAda_Unicode is + for Library_Name use "xmlada_unicode"; + + for Library_Kind use Xmlada_Shared.Xmlada_Kind; +- for Source_Dirs use ("../../include/xmlada"); ++ for Source_Dirs use (Directories.Includedir & "/xmlada"); + for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; +- for Library_Dir use "../xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; + for Library_Version use + "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; + for Externally_Built use "true"; diff --git a/xmlada.spec b/xmlada.spec new file mode 100644 index 0000000..034ed3f --- /dev/null +++ b/xmlada.spec @@ -0,0 +1,132 @@ +Name: xmlada +Version: 3.2.1 +Release: 9%{?dist} +Summary: XML library for Ada +Group: System Environment/Libraries +License: GPLv2+ +URL: http://libre.adacore.com +## Direct download link is unavailable +## http://libre.adacore.com/libre/download/ +Source0: xmlada-gpl-3.2.1-src.tgz +## Patch for use relocatable libs instead static +## and add DESTDIR option for make install +Patch0: %{name}-destdir.patch +## Fedora-specific +Patch1: %{name}-gpr.patch +Patch2: %{name}-gnatflags.patch +BuildRequires: chrpath +BuildRequires: gcc-gnat +BuildRequires: fedora-gnat-project-common >= 2 + +%description +XML/Ada includes support for parsing XML files, including DTDs, +full support for SAX, +and an almost complete support for the core part of the DOM. +It includes support for validating XML files with XML schemas. + +%package devel +Summary: XML library for Ada devel package +Group: Development/Libraries +License: GPLv2+ +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: fedora-gnat-project-common >= 2 + +%description devel +Xml library for ada devel package. + +%prep +%setup -q -n xmlada-3.2.1-src +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%build +%configure --disable-rpath +make %{?_smp_mflags} GNATFLAGS="%{GNAT_optflags}" ADA_PROJECT_PATH=%_GNAT_project_dir + + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} ADA_PROJECT_PATH=%_GNAT_project_dir +## Revoke exec permissions +find %{buildroot} -name '*.gpr' -exec chmod -x {} \; +find %{buildroot}%{_docdir} -type f -exec chmod -x {} \; +## Delete old bash script (not needed now) +rm -f %{buildroot}%{_bindir}/xmlada-config +## delete rpath manually (#674793) +chrpath --delete %{buildroot}%{_libdir}/libxmlada* +install -d -m 0755 %{buildroot}/%{_libdir}/%{name}/static/ +## There is not GNAT programming studio in Fedora +## To enable GPS plugin delete this string and create subpackage +rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* + +%files +%defattr(-,root,root,-) +%doc README TODO AUTHORS COPYING +%dir %{_libdir}/%{name} +%dir %{_docdir}/%{name} +%dir %{_libdir}/%{name}/relocatable +%dir %{_libdir}/%{name}/static +%{_libdir}/lib%{name}_dom.so.* +%{_libdir}/lib%{name}_input_sources.so.* +%{_libdir}/lib%{name}_schema.so.* +%{_libdir}/lib%{name}_unicode.so.* +%{_libdir}/lib%{name}_sax.so.* +%{_libdir}/%{name}/relocatable/lib%{name}*.so.* +%{_docdir}/%{name}/xml.html +%{_docdir}/%{name}/xml.info +%{_docdir}/%{name}/xml.pdf + + +%files devel +%defattr(-,root,root,-) +%dir %{_includedir}/%{name} +%dir %{_GNAT_project_dir}/%{name} +%{_GNAT_project_dir}/%{name}.gpr +%{_GNAT_project_dir}/xmlada_shared.gpr +%{_GNAT_project_dir}/%{name}/xmlada_dom.lgpr +%{_GNAT_project_dir}/%{name}/xmlada_input_sources.lgpr +%{_GNAT_project_dir}/%{name}/xmlada_sax.lgpr +%{_GNAT_project_dir}/%{name}/xmlada_schema.lgpr +%{_GNAT_project_dir}/%{name}/xmlada_unicode.lgpr +%{_GNAT_project_dir}/%{name}_dom.gpr +%{_GNAT_project_dir}/%{name}_input.gpr +%{_GNAT_project_dir}/%{name}_sax.gpr +%{_GNAT_project_dir}/%{name}_schema.gpr +%{_GNAT_project_dir}/%{name}_unicode.gpr +%{_includedir}/%{name}/*.adb +%{_includedir}/%{name}/*.ads +%{_libdir}/%{name}/relocatable/*.ali +%{_libdir}/%{name}/relocatable/lib%{name}*.so + + + +%changelog +* Tue Mar 01 2011 Pavel Zhukov - 3.2.1-9 +- use macros _GNAT_project_di +- fix hardcode includedir +- fix BuildRequires +- fix owned dir +- fix ?_isa + +* Sun Feb 20 2011 Pavel Zhukov - 3.2.1-8 +- fix spec errors +- fix directories for rawhide +- fix gcc-4.6 issues +- fix libdir + +* Fri Feb 11 2011 Pavel Zhukov - 3.2.1-6 +- move gpr to /usr/share/gpr(/xmlada) + +* Mon Feb 7 2011 Pavel Zhukov - 3.2.1-5 +- move so to -devel package fix spec errors + +* Sun Feb 6 2011 Pavel Zhukov - 3.2.1-4 +- fix dir owner + +* Sat Feb 5 2011 Pavel Zhukov - 3.2.1-3 +- fix errors in Makefile +- fix files list + +* Fri Feb 4 2011 Pavel Zhukov - 3.2.1-1 +- Initial spec From b13b308b0d90b142a78d7bc227034480111def4e Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Sat, 5 Mar 2011 11:58:24 +0300 Subject: [PATCH 2/6] Fix libdir problem --- xmlada-gpr.patch | 10 +++++----- xmlada.spec | 17 ++++++++++------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/xmlada-gpr.patch b/xmlada-gpr.patch index fde55ea..74384fe 100644 --- a/xmlada-gpr.patch +++ b/xmlada-gpr.patch @@ -12,7 +12,7 @@ + for Source_Dirs use (Directories.Includedir & "/xmlada"); for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; - for Library_Dir use "../xmlada/" & Project'Library_Kind; -+ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "/xmlada/" & Project'Library_Kind; for Library_Version use "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; for Externally_Built use "true"; @@ -31,7 +31,7 @@ + for Source_Dirs use (Directories.Includedir & "/xmlada"); for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; - for Library_Dir use "../xmlada/" & Project'Library_Kind; -+ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "/xmlada/" & Project'Library_Kind; for Library_Version use "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; for Externally_Built use "true"; @@ -49,7 +49,7 @@ + for Source_Dirs use (Directories.Includedir & "/xmlada"); for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; - for Library_Dir use "../xmlada/" & Project'Library_Kind; -+ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "/xmlada/" & Project'Library_Kind; for Library_Version use "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; for Externally_Built use "true"; @@ -74,7 +74,7 @@ + for Source_Dirs use (Directories.Includedir & "/xmlada"); for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; - for Library_Dir use "../xmlada/" & Project'Library_Kind; -+ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "/xmlada/" & Project'Library_Kind; for Library_Version use "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; for Externally_Built use "true"; @@ -91,7 +91,7 @@ + for Source_Dirs use (Directories.Includedir & "/xmlada"); for Source_List_File use "xmlada/" & Project'Library_Name & ".lgpr"; - for Library_Dir use "../xmlada/" & Project'Library_Kind; -+ for Library_Dir use Directories.Libdir & "xmlada/" & Project'Library_Kind; ++ for Library_Dir use Directories.Libdir & "/xmlada/" & Project'Library_Kind; for Library_Version use "lib" & Project'Library_Name & ".so." & Xmlada_Shared.Version; for Externally_Built use "true"; diff --git a/xmlada.spec b/xmlada.spec index 034ed3f..5d95cb0 100644 --- a/xmlada.spec +++ b/xmlada.spec @@ -1,6 +1,6 @@ Name: xmlada Version: 3.2.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: XML library for Ada Group: System Environment/Libraries License: GPLv2+ @@ -102,6 +102,9 @@ rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* %changelog +* Tue Mar 01 2011 Pavel Zhukov - 3.2.1-10 +- fix path for fedora-gnat-project-common + * Tue Mar 01 2011 Pavel Zhukov - 3.2.1-9 - use macros _GNAT_project_di - fix hardcode includedir @@ -109,24 +112,24 @@ rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* - fix owned dir - fix ?_isa -* Sun Feb 20 2011 Pavel Zhukov - 3.2.1-8 +* Sun Feb 20 2011 Pavel Zhukov - 3.2.1-8 - fix spec errors - fix directories for rawhide - fix gcc-4.6 issues - fix libdir -* Fri Feb 11 2011 Pavel Zhukov - 3.2.1-6 +* Fri Feb 11 2011 Pavel Zhukov - 3.2.1-6 - move gpr to /usr/share/gpr(/xmlada) -* Mon Feb 7 2011 Pavel Zhukov - 3.2.1-5 +* Mon Feb 7 2011 Pavel Zhukov - 3.2.1-5 - move so to -devel package fix spec errors -* Sun Feb 6 2011 Pavel Zhukov - 3.2.1-4 +* Sun Feb 6 2011 Pavel Zhukov - 3.2.1-4 - fix dir owner -* Sat Feb 5 2011 Pavel Zhukov - 3.2.1-3 +* Sat Feb 5 2011 Pavel Zhukov - 3.2.1-3 - fix errors in Makefile - fix files list -* Fri Feb 4 2011 Pavel Zhukov - 3.2.1-1 +* Fri Feb 4 2011 Pavel Zhukov - 3.2.1-1 - Initial spec From 294ed11123d4d3937c30a1e41f4b8f179ead6d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 23 Mar 2011 10:31:35 +0100 Subject: [PATCH 3/6] updated the supported arch list --- xmlada.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xmlada.spec b/xmlada.spec index 5d95cb0..f5f3fe1 100644 --- a/xmlada.spec +++ b/xmlada.spec @@ -1,6 +1,6 @@ Name: xmlada Version: 3.2.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: XML library for Ada Group: System Environment/Libraries License: GPLv2+ @@ -17,6 +17,8 @@ Patch2: %{name}-gnatflags.patch BuildRequires: chrpath BuildRequires: gcc-gnat BuildRequires: fedora-gnat-project-common >= 2 +# gcc-gnat only available on these: +ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 alpha %description XML/Ada includes support for parsing XML files, including DTDs, @@ -102,6 +104,9 @@ rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* %changelog +* Wed Mar 23 2011 Dan Horák - 3.2.1-11 +- updated the supported arch list + * Tue Mar 01 2011 Pavel Zhukov - 3.2.1-10 - fix path for fedora-gnat-project-common From f5fb2c678d8516a8068af6e94f7aab8c6ae8eac5 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Wed, 30 Mar 2011 14:43:33 +0400 Subject: [PATCH 4/6] Fix libraries types (#692054) --- xmlada.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xmlada.spec b/xmlada.spec index f5f3fe1..17f8424 100644 --- a/xmlada.spec +++ b/xmlada.spec @@ -17,8 +17,6 @@ Patch2: %{name}-gnatflags.patch BuildRequires: chrpath BuildRequires: gcc-gnat BuildRequires: fedora-gnat-project-common >= 2 -# gcc-gnat only available on these: -ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 alpha %description XML/Ada includes support for parsing XML files, including DTDs, @@ -43,7 +41,7 @@ Xml library for ada devel package. %patch2 -p1 %build -%configure --disable-rpath +%configure --disable-rpath --enable-shared --disable-static make %{?_smp_mflags} GNATFLAGS="%{GNAT_optflags}" ADA_PROJECT_PATH=%_GNAT_project_dir @@ -104,8 +102,8 @@ rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* %changelog -* Wed Mar 23 2011 Dan Horák - 3.2.1-11 -- updated the supported arch list +* Wed Mar 30 2011 Pavel Zhukov - 3.2.1-11 +- Fix library type (add configure options) * Tue Mar 01 2011 Pavel Zhukov - 3.2.1-10 - fix path for fedora-gnat-project-common From 8f5e17e0f04efda907c3987554863b1cabef99bf Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Sat, 16 Jul 2011 12:26:54 +0400 Subject: [PATCH 5/6] Update to new release --- .gitignore | 1 + sources | 2 +- ...-destdir.patch => xmlada-4.1-destdir.patch | 211 +++++++++--------- ...tflags.patch => xmlada-4.1-gnatflags.patch | 14 +- xmlada.spec | 25 ++- 5 files changed, 134 insertions(+), 119 deletions(-) rename xmlada-destdir.patch => xmlada-4.1-destdir.patch (61%) rename xmlada-gnatflags.patch => xmlada-4.1-gnatflags.patch (50%) diff --git a/.gitignore b/.gitignore index 38da341..812bbbe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /xmlada-gpl-3.2.1-src.tgz +/xmlada-gpl-4.1-src.tgz diff --git a/sources b/sources index 68d590f..3dfd44e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f52e66adee5cdf7d8b7c7454d0cbc196 xmlada-gpl-3.2.1-src.tgz +c17ac563b8375bd652a0eb8e141cda59 xmlada-gpl-4.1-src.tgz diff --git a/xmlada-destdir.patch b/xmlada-4.1-destdir.patch similarity index 61% rename from xmlada-destdir.patch rename to xmlada-4.1-destdir.patch index cb68ecd..f501632 100644 --- a/xmlada-destdir.patch +++ b/xmlada-4.1-destdir.patch @@ -1,93 +1,16 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -1,8 +1,8 @@ - ## The type of library we want to build. Possible values: +--- a/Makefile.in 2011-07-16 11:17:09.335569486 +0400 ++++ b/Makefile.in 2011-07-16 11:19:13.406569528 +0400 +@@ -2,7 +2,7 @@ ## relocatable ## static --LIBRARY_TYPE=static + LIBRARY_TYPE=static - -+LIBRARY_TYPE=relocatable +DESTDIR ?= # Replace with the location for the installation directory INSTALL=@INSTALL@ PACKAGE_TARNAME=@PACKAGE_TARNAME@ -@@ -50,8 +50,8 @@ - .PHONY: all obj clean install install_dirs build_library_type install_library_type - - ifeq (${BUILDS_SHARED},yes) --all: static relocatable --install: install_static install_relocatable -+all: relocatable -+install: install_relocatable - else - all: static - install: install_static -@@ -64,17 +64,17 @@ - ${MAKE} LIBRARY_TYPE=relocatable build_library_type - - obj: force -- ${GNATMAKE} -p -Punicode/unicode.gpr ${MAKE_ARGS} -- ${GNATMAKE} -p -Pinput_sources/input_sources.gpr ${MAKE_ARGS} -- ${GNATMAKE} -p -Psax/sax.gpr ${MAKE_ARGS} -- ${GNATMAKE} -p -Pdom/dom.gpr ${MAKE_ARGS} -- ${GNATMAKE} -p -Pschema/schema.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Punicode/unicode.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Pinput_sources/input_sources.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Psax/sax.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Pdom/dom.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Pschema/schema.gpr ${MAKE_ARGS} - - test: force -- ${GNATMAKE} -p -Punicode/test/unicode_test.gpr ${MAKE_ARGS} -- ${GNATMAKE} -p -Psax/test/sax_test.gpr ${MAKE_ARGS} -- ${GNATMAKE} -p -Pdom/test/dom_test.gpr ${MAKE_ARGS} -- ${GNATMAKE} -p -Pschema/test/schema_test.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Punicode/test/unicode_test.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Psax/test/sax_test.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Pdom/test/dom_test.gpr ${MAKE_ARGS} -+ ${GNATMAKE} -R -p -Pschema/test/schema_test.gpr ${MAKE_ARGS} - - run_test: force - @cd unicode/test; ./test_unicode -@@ -88,57 +88,55 @@ - - # Rule for installing the modules - %_inst: force -- ${CP} $*/*.ad[bs] ${includedir}/xmlada -- cd $*; ls *.ad[bs] > ${libdir}/gnat/xmlada/xmlada_$*.lgpr -- -cd ${xmllib}; ${CHMOD} ugo+w *.ali -- -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${xmllib} -- ${RM} ${libdir}/libxmlada_$** -- ${RM} ${xmllib}libxmlada_$** -+ ${CP} $*/*.ad[bs] ${DESTDIR}/${includedir}/xmlada -+ cd $*; ls *.ad[bs] > ${DESTDIR}/${ADA_PROJECT_PATH}/xmlada/xmlada_$*.lgpr -+ -cd ${DESTDIR}/${xmllib}; ${CHMOD} ugo+w *.ali -+ -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${DESTDIR}/${xmllib} -+ ${RM} ${DESTDIR}/${libdir}/libxmlada_$** -+ ${RM} ${DESTDIR}/${xmllib}libxmlada_$** - ifeq (${LIBRARY_TYPE},static) -- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${xmllib} -+ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${DESTDIR}/${xmllib} - else - ifeq (${OS},Windows_NT) -- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} ${xmllib} -+ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} ${DESTDIR}/${xmllib} - cd ${bindir}; ${CP} ${libdir}/xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} libxmlada_$*.${LIBEXT} - else -- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} ${xmllib} -- cd ${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT} -- cd ${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} -- cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} -- cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${VERSION} -+ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} ${DESTDIR}/${xmllib} -+ cd ${DESTDIR}/${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT} -+ cd ${DESTDIR}/${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} -+ cd ${DESTDIR}/${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} -+ cd ${DESTDIR}/${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${VERSION} - endif - endif -- cd ${xmllib}; ${CHMOD} ugo-w *.ali -+ cd ${DESTDIR}/${xmllib}; ${CHMOD} ugo-w *.ali +@@ -114,30 +114,30 @@ + cd ${xmllib}; ${CHMOD} ugo-w *.ali install_dirs: force - @${MKDIR} ${bindir} @@ -98,7 +21,7 @@ - @${MKDIR} ${datadir}/gps/plug-ins/ + @${MKDIR} ${DESTDIR}/${bindir} + @${MKDIR} ${DESTDIR}/${xmllib} -+ @${MKDIR} ${DESTDIR}/${ADA_PROJECT_PATH}/xmlada ++ @${MKDIR} ${DESTDIR}/${libdir}/gnat/xmlada + @${MKDIR} ${DESTDIR}/${datadir}/doc/xmlada + @${MKDIR} ${DESTDIR}/${includedir}/xmlada + @${MKDIR} ${DESTDIR}/${datadir}/gps/plug-ins/ @@ -120,13 +43,13 @@ - -${INSTALL} docs/xml.info ${datadir}/doc/xmlada - ${CHMOD} +x ${bindir}/xmlada-config - ${INSTALL} distrib/xmlada_gps.py ${datadir}/gps/plug-ins/ -+ ${INSTALL} distrib/xmlada_shared.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ -+ ${INSTALL} distrib/xmlada.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ -+ ${INSTALL} distrib/xmlada_dom.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ -+ ${INSTALL} distrib/xmlada_sax.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ -+ ${INSTALL} distrib/xmlada_input.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ -+ ${INSTALL} distrib/xmlada_schema.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ -+ ${INSTALL} distrib/xmlada_unicode.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_shared.gpr ${DESTDIR}/${libdir}/gnat ++ ${INSTALL} distrib/xmlada.gpr ${DESTDIR}/${libdir}/gnat/ ++ ${INSTALL} distrib/xmlada_dom.gpr ${DESTDIR}/${libdir}/gnat/ ++ ${INSTALL} distrib/xmlada_sax.gpr ${DESTDIR}/${libdir}/gnat/ ++ ${INSTALL} distrib/xmlada_input.gpr ${DESTDIR}/${libdir}/gnat/ ++ ${INSTALL} distrib/xmlada_schema.gpr ${DESTDIR}/${libdir}/gnat/ ++ ${INSTALL} distrib/xmlada_unicode.gpr ${DESTDIR}/${libdir}/gnat/ + ${INSTALL} xmlada-config ${DESTDIR}/${bindir} + -${INSTALL} docs/xml.ps ${DESTDIR}/${datadir}/doc/xmlada 2>/dev/null + -${INSTALL} docs/xml.pdf ${DESTDIR}/${datadir}/doc/xmlada @@ -136,17 +59,99 @@ + ${INSTALL} distrib/xmlada_gps.py ${DESTDIR}/${datadir}/gps/plug-ins/ ## Do the installation for an explicit target --install_static: -- ${MAKE} LIBRARY_TYPE=static install_library_type - install_shared install_relocatable: - ${MAKE} LIBRARY_TYPE=relocatable install_library_type + install_static: +--- a/Makefile.in 2011-07-16 11:21:57.232569582 +0400 ++++ b/Makefile.in 2011-07-16 11:22:12.952569588 +0400 +@@ -1,7 +1,7 @@ + ## The type of library we want to build. Possible values: + ## relocatable + ## static +-LIBRARY_TYPE=static ++LIBRARY_TYPE=relocatable + DESTDIR ?= + # Replace with the location for the installation directory + INSTALL=@INSTALL@ +--- a/Makefile.in 2011-07-16 11:27:57.295569704 +0400 ++++ b/Makefile.in 2011-07-16 11:30:25.628569754 +0400 +@@ -91,27 +91,27 @@ -@@ -153,7 +151,7 @@ - -gnat clean -XLIBRARY_TYPE=$* -q -Psax/test/sax_test.gpr - -gnat clean -XLIBRARY_TYPE=$* -q -Pschema/test/schema_test.gpr + # Rule for installing the modules + %_inst: force +- ${CP} $*/*.ad[bs] ${includedir}/xmlada +- cd $*; ls *.ad[bs] > ${libdir}/gnat/xmlada/xmlada_$*.lgpr +- -cd ${xmllib}; ${CHMOD} ugo+w *.ali +- -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${xmllib} +- ${RM} ${libdir}/libxmlada_$** +- ${RM} ${xmllib}libxmlada_$** ++ ${CP} $*/*.ad[bs] ${DESTDIR}/${includedir}/xmlada ++ cd $*; ls *.ad[bs] > ${DESTDIR}/${libdir}/gnat/xmlada/xmlada_$*.lgpr ++ -cd ${DESTDIR}/${xmllib}; ${CHMOD} ugo+w *.ali ++ -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${DESTDIR}/${xmllib} ++ ${RM} ${DESTDIR}/${libdir}/libxmlada_$** ++ ${RM} ${DESTDIR}/${xmllib}libxmlada_$** + ifeq (${LIBRARY_TYPE},static) +- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${xmllib} ++ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.a ${DESTDIR}/${xmllib} + else + ifeq (${OS},Windows_NT) + ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} ${xmllib} + cd ${bindir}; ${CP} ${libdir}/xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT} libxmlada_$*.${LIBEXT} + else +- ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} ${xmllib} +- cd ${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT} +- cd ${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} +- cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} +- cd ${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${VERSION} ++ ${INSTALL} $*/lib/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} ${DESTDIR}/${xmllib} ++ cd ${DESTDIR}/${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT} ++ cd ${DESTDIR}/${xmllib}; ${LN_S} libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} ++ cd ${DESTDIR}/${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${basename ${VERSION}} ++ cd ${DESTDIR}/${libdir}; ${LN_S} xmlada/${LIBRARY_TYPE}/libxmlada_$*.${LIBEXT}.${VERSION} libxmlada_$*.${LIBEXT}.${VERSION} + endif + endif +- cd ${xmllib}; ${CHMOD} ugo-w *.ali ++ cd ${DESTDIR}/${xmllib}; ${CHMOD} ugo-w *.ali --clean: clean_relocatable clean_static -+clean: clean_relocatable - cd docs; ${MAKE} -e clean - - distclean: clean + install_dirs: force + @${MKDIR} ${DESTDIR}/${bindir} +--- a/Makefile.in 2011-07-16 11:47:49.580570102 +0400 ++++ b/Makefile.in 2011-07-16 11:49:47.465570142 +0400 +@@ -92,7 +92,7 @@ + # Rule for installing the modules + %_inst: force + ${CP} $*/*.ad[bs] ${DESTDIR}/${includedir}/xmlada +- cd $*; ls *.ad[bs] > ${DESTDIR}/${libdir}/gnat/xmlada/xmlada_$*.lgpr ++ cd $*; ls *.ad[bs] > ${DESTDIR}/${ADA_PROJECT_PATH}/xmlada/xmlada_$*.lgpr + -cd ${DESTDIR}/${xmllib}; ${CHMOD} ugo+w *.ali + -${CP} $*/lib/${LIBRARY_TYPE}/*.ali ${DESTDIR}/${xmllib} + ${RM} ${DESTDIR}/${libdir}/libxmlada_$** +@@ -116,7 +116,7 @@ + install_dirs: force + @${MKDIR} ${DESTDIR}/${bindir} + @${MKDIR} ${DESTDIR}/${xmllib} +- @${MKDIR} ${DESTDIR}/${libdir}/gnat/xmlada ++ @${MKDIR} ${DESTDIR}/${ADA_PROJECT_PATH}/xmlada + @${MKDIR} ${DESTDIR}/${datadir}/doc/xmlada + @${MKDIR} ${DESTDIR}/${includedir}/xmlada + @${MKDIR} ${DESTDIR}/${datadir}/gps/plug-ins/ +@@ -124,13 +124,13 @@ + ## Do the installation for either shared or static, depending on + ## $LIBRARY_TYPE + install_library_type: install_dirs ${MODULE_INSTALL} +- ${INSTALL} distrib/xmlada_shared.gpr ${DESTDIR}/${libdir}/gnat +- ${INSTALL} distrib/xmlada.gpr ${DESTDIR}/${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_dom.gpr ${DESTDIR}/${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_sax.gpr ${DESTDIR}/${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_input.gpr ${DESTDIR}/${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_schema.gpr ${DESTDIR}/${libdir}/gnat/ +- ${INSTALL} distrib/xmlada_unicode.gpr ${DESTDIR}/${libdir}/gnat/ ++ ${INSTALL} distrib/xmlada_shared.gpr ${DESTDIR}/${ADA_PROJECT_PATH} ++ ${INSTALL} distrib/xmlada.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_dom.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_sax.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_input.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_schema.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ ++ ${INSTALL} distrib/xmlada_unicode.gpr ${DESTDIR}/${ADA_PROJECT_PATH}/ + ${INSTALL} xmlada-config ${DESTDIR}/${bindir} + -${INSTALL} docs/xml.ps ${DESTDIR}/${datadir}/doc/xmlada 2>/dev/null + -${INSTALL} docs/xml.pdf ${DESTDIR}/${datadir}/doc/xmlada diff --git a/xmlada-gnatflags.patch b/xmlada-4.1-gnatflags.patch similarity index 50% rename from xmlada-gnatflags.patch rename to xmlada-4.1-gnatflags.patch index 7120a49..6f1008d 100644 --- a/xmlada-gnatflags.patch +++ b/xmlada-4.1-gnatflags.patch @@ -1,5 +1,5 @@ ---- a/Makefile.in 2011-02-20 17:55:26.420257717 +0300 -+++ b/Makefile.in 2011-02-20 17:56:13.768263891 +0300 +--- a/Makefile.in 2011-07-16 12:05:27.728570456 +0400 ++++ b/Makefile.in 2011-07-16 12:06:24.945570476 +0400 @@ -3,6 +3,7 @@ ## static LIBRARY_TYPE=relocatable @@ -8,12 +8,12 @@ # Replace with the location for the installation directory INSTALL=@INSTALL@ PACKAGE_TARNAME=@PACKAGE_TARNAME@ -@@ -18,7 +19,7 @@ - docdir=@docdir@ - includedir=@includedir@ +@@ -20,7 +21,7 @@ --GNATMAKE=@gnatmake@ -+GNATMAKE=@gnatmake@ ${GNATFLAGS} + # Set a default value (ignored if set in the environment) + PROCESSORS?=1 +-GNATMAKE=@gnatmake@ -j${PROCESSORS} ++GNATMAKE=@gnatmake@ ${GNATFLAGS} # Compiler mode: one of "distrib", "debug", "optimize", "profile" MODE=distrib diff --git a/xmlada.spec b/xmlada.spec index 17f8424..add269d 100644 --- a/xmlada.spec +++ b/xmlada.spec @@ -1,19 +1,19 @@ Name: xmlada -Version: 3.2.1 -Release: 11%{?dist} +Version: 4.1 +Release: 1%{?dist} Summary: XML library for Ada Group: System Environment/Libraries License: GPLv2+ URL: http://libre.adacore.com ## Direct download link is unavailable ## http://libre.adacore.com/libre/download/ -Source0: xmlada-gpl-3.2.1-src.tgz +Source0: xmlada-gpl-%{version}-src.tgz ## Patch for use relocatable libs instead static ## and add DESTDIR option for make install -Patch0: %{name}-destdir.patch +Patch0: %{name}-%{version}-destdir.patch ## Fedora-specific Patch1: %{name}-gpr.patch -Patch2: %{name}-gnatflags.patch +Patch2: %{name}-%{version}-gnatflags.patch BuildRequires: chrpath BuildRequires: gcc-gnat BuildRequires: fedora-gnat-project-common >= 2 @@ -35,7 +35,7 @@ Requires: fedora-gnat-project-common >= 2 Xml library for ada devel package. %prep -%setup -q -n xmlada-3.2.1-src +%setup -q -n xmlada-4.1-src %patch0 -p1 %patch1 -p1 %patch2 -p1 @@ -47,18 +47,23 @@ make %{?_smp_mflags} GNATFLAGS="%{GNAT_optflags}" ADA_PROJECT_PATH=%_GNAT_proje %install rm -rf %{buildroot} -make install DESTDIR=%{buildroot} ADA_PROJECT_PATH=%_GNAT_project_dir +export BUILDS_SHARED=yes +make install DESTDIR=%{buildroot} ADA_PROJECT_PATH=%_GNAT_project_dir BUILDS_SHARED=yes ## Revoke exec permissions find %{buildroot} -name '*.gpr' -exec chmod -x {} \; find %{buildroot}%{_docdir} -type f -exec chmod -x {} \; ## Delete old bash script (not needed now) rm -f %{buildroot}%{_bindir}/xmlada-config ## delete rpath manually (#674793) -chrpath --delete %{buildroot}%{_libdir}/libxmlada* +chrpath --delete %{buildroot}%{_libdir}/%{name}/relocatable/libxmlada* install -d -m 0755 %{buildroot}/%{_libdir}/%{name}/static/ ## There is not GNAT programming studio in Fedora ## To enable GPS plugin delete this string and create subpackage rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* +rm -f %{buildroot}/%{_libdir}/%{name}/static/* +## only-non-binary-in-usr-lib +find %{buildroot}/%{_libdir}/ -type f -exec chmod -x {} \; +find %{buildroot}/%_GNAT_project_dir -type f -exec chmod -x {} \; %files %defattr(-,root,root,-) @@ -78,6 +83,7 @@ rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* %{_docdir}/%{name}/xml.pdf + %files devel %defattr(-,root,root,-) %dir %{_includedir}/%{name} @@ -102,6 +108,9 @@ rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* %changelog +* Sat Jul 15 2011 Pavel Zhukov - 4.1-1 +- Update to new release GNAT-GPL-2011 + * Wed Mar 30 2011 Pavel Zhukov - 3.2.1-11 - Fix library type (add configure options) From 36cd01ab6e1f015fb2d401ee8493976c5d41f912 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Sat, 16 Jul 2011 13:42:20 +0400 Subject: [PATCH 6/6] Fix files perms --- xmlada.spec | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/xmlada.spec b/xmlada.spec index add269d..b155ab8 100644 --- a/xmlada.spec +++ b/xmlada.spec @@ -1,19 +1,19 @@ -Name: xmlada -Version: 4.1 -Release: 1%{?dist} -Summary: XML library for Ada -Group: System Environment/Libraries -License: GPLv2+ -URL: http://libre.adacore.com +Name: xmlada +Version: 4.1 +Release: 2%{?dist} +Summary: XML library for Ada +Group: System Environment/Libraries +License: GPLv2+ +URL: http://libre.adacore.com ## Direct download link is unavailable ## http://libre.adacore.com/libre/download/ -Source0: xmlada-gpl-%{version}-src.tgz +Source0: xmlada-gpl-%{version}-src.tgz ## Patch for use relocatable libs instead static ## and add DESTDIR option for make install -Patch0: %{name}-%{version}-destdir.patch +Patch0: %{name}-%{version}-destdir.patch ## Fedora-specific -Patch1: %{name}-gpr.patch -Patch2: %{name}-%{version}-gnatflags.patch +Patch1: %{name}-gpr.patch +Patch2: %{name}-%{version}-gnatflags.patch BuildRequires: chrpath BuildRequires: gcc-gnat BuildRequires: fedora-gnat-project-common >= 2 @@ -29,7 +29,7 @@ Summary: XML library for Ada devel package Group: Development/Libraries License: GPLv2+ Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: fedora-gnat-project-common >= 2 +Requires: fedora-gnat-project-common >= 2 %description devel Xml library for ada devel package. @@ -62,8 +62,6 @@ install -d -m 0755 %{buildroot}/%{_libdir}/%{name}/static/ rm -f %{buildroot}/%{_datadir}/gps/plug-ins/%{name}_gps.py* rm -f %{buildroot}/%{_libdir}/%{name}/static/* ## only-non-binary-in-usr-lib -find %{buildroot}/%{_libdir}/ -type f -exec chmod -x {} \; -find %{buildroot}/%_GNAT_project_dir -type f -exec chmod -x {} \; %files %defattr(-,root,root,-) @@ -108,8 +106,9 @@ find %{buildroot}/%_GNAT_project_dir -type f -exec chmod -x {} \; %changelog -* Sat Jul 15 2011 Pavel Zhukov - 4.1-1 +* Sat Jul 15 2011 Pavel Zhukov - 4.1-2 - Update to new release GNAT-GPL-2011 +- Fix permissions * Wed Mar 30 2011 Pavel Zhukov - 3.2.1-11 - Fix library type (add configure options)