diff --git a/README.en.md b/README.en.md index 25a00e9..7d02fa7 100644 --- a/README.en.md +++ b/README.en.md @@ -1,7 +1,7 @@ # libmetal #### Description -Bare metal interaction APIs +An abstraction layer across user-space Linux, baremetal, and RTOS environments. #### Software Architecture Software architecture description diff --git a/libmetal-2020.10.0.tar.gz b/libmetal-2020.10.0.tar.gz new file mode 100644 index 0000000..364036f Binary files /dev/null and b/libmetal-2020.10.0.tar.gz differ diff --git a/libmetal-add-additional-arches.patch b/libmetal-add-additional-arches.patch new file mode 100644 index 0000000..78b26a3 --- /dev/null +++ b/libmetal-add-additional-arches.patch @@ -0,0 +1,417 @@ +diff --git a/lib/processor/armv7l b/lib/processor/armv7l +new file mode 120000 +index 0000000..5b6b0c0 +--- /dev/null ++++ b/lib/processor/armv7l +@@ -0,0 +1 @@ ++arm/ +\ No newline at end of file +diff --git a/lib/processor/i686/CMakeLists.txt b/lib/processor/i686/CMakeLists.txt +new file mode 100644 +index 0000000..9e9c101 +--- /dev/null ++++ b/lib/processor/i686/CMakeLists.txt +@@ -0,0 +1,4 @@ ++collect (PROJECT_LIB_HEADERS atomic.h) ++collect (PROJECT_LIB_HEADERS cpu.h) ++ ++# vim: expandtab:ts=2:sw=2:smartindent +diff --git a/lib/processor/i686/atomic.h b/lib/processor/i686/atomic.h +new file mode 100644 +index 0000000..9760d37 +--- /dev/null ++++ b/lib/processor/i686/atomic.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * 3. Neither the name of Xilinx nor the names of its contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * @file gcc/atomic.h ++ * @brief GCC specific atomic primitives for libmetal. ++ */ ++ ++#ifndef __METAL_I686_ATOMIC__H__ ++#define __METAL_I686_ATOMIC__H__ ++ ++ ++#endif /* __METAL_I686_ATOMIC__H__ */ +diff --git a/lib/processor/i686/cpu.h b/lib/processor/i686/cpu.h +new file mode 100644 +index 0000000..bb8c751 +--- /dev/null ++++ b/lib/processor/i686/cpu.h +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * 3. Neither the name of Xilinx nor the names of its contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * @file cpu.h ++ * @brief CPU specific primatives ++ */ ++ ++#ifndef __METAL_I686_CPU__H__ ++#define __METAL_I686_CPU__H__ ++ ++#define metal_cpu_yield() asm volatile("rep; nop") ++ ++#endif /* __METAL_I686_CPU__H__ */ +diff --git a/lib/processor/ppc64/CMakeLists.txt b/lib/processor/ppc64/CMakeLists.txt +new file mode 100644 +index 0000000..9e9c101 +--- /dev/null ++++ b/lib/processor/ppc64/CMakeLists.txt +@@ -0,0 +1,4 @@ ++collect (PROJECT_LIB_HEADERS atomic.h) ++collect (PROJECT_LIB_HEADERS cpu.h) ++ ++# vim: expandtab:ts=2:sw=2:smartindent +diff --git a/lib/processor/ppc64/atomic.h b/lib/processor/ppc64/atomic.h +new file mode 100644 +index 0000000..dbf5533 +--- /dev/null ++++ b/lib/processor/ppc64/atomic.h +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * 3. Neither the name of Xilinx nor the names of its contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * @file gcc/atomic.h ++ * @brief GCC specific atomic primitives for libmetal. ++ */ ++ ++#ifndef __METAL_PPC64_ATOMIC__H__ ++#define __METAL_PPC64_ATOMIC__H__ ++ ++#endif /* __METAL_PPC64_ATOMIC__H__ */ +diff --git a/lib/processor/ppc64/cpu.h b/lib/processor/ppc64/cpu.h +new file mode 100644 +index 0000000..3432fd5 +--- /dev/null ++++ b/lib/processor/ppc64/cpu.h +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * 3. Neither the name of Xilinx nor the names of its contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * @file cpu.h ++ * @brief CPU specific primatives ++ */ ++ ++#ifndef __METAL_PPC64_CPU__H__ ++#define __METAL_PPC64_CPU__H__ ++ ++#define metal_cpu_yield() ++ ++#endif /* __METAL_PPC64_CPU__H__ */ +diff --git a/lib/processor/ppc64le/CMakeLists.txt b/lib/processor/ppc64le/CMakeLists.txt +new file mode 100644 +index 0000000..9e9c101 +--- /dev/null ++++ b/lib/processor/ppc64le/CMakeLists.txt +@@ -0,0 +1,4 @@ ++collect (PROJECT_LIB_HEADERS atomic.h) ++collect (PROJECT_LIB_HEADERS cpu.h) ++ ++# vim: expandtab:ts=2:sw=2:smartindent +diff --git a/lib/processor/ppc64le/atomic.h b/lib/processor/ppc64le/atomic.h +new file mode 100644 +index 0000000..93f5d15 +--- /dev/null ++++ b/lib/processor/ppc64le/atomic.h +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * 3. Neither the name of Xilinx nor the names of its contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * @file gcc/atomic.h ++ * @brief GCC specific atomic primitives for libmetal. ++ */ ++ ++#ifndef __METAL_PPC64LE_ATOMIC__H__ ++#define __METAL_PPC64LE_ATOMIC__H__ ++ ++#endif /* __METAL_PPC64LE_ATOMIC__H__ */ +diff --git a/lib/processor/ppc64le/cpu.h b/lib/processor/ppc64le/cpu.h +new file mode 100644 +index 0000000..77b4d1c +--- /dev/null ++++ b/lib/processor/ppc64le/cpu.h +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * 3. Neither the name of Xilinx nor the names of its contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * @file cpu.h ++ * @brief CPU specific primatives ++ */ ++ ++#ifndef __METAL_PPC64LE_CPU__H__ ++#define __METAL_PPC64LE_CPU__H__ ++ ++#define metal_cpu_yield() ++ ++#endif /* __METAL_PPC64LE_CPU__H__ */ +diff --git a/lib/processor/s390x/CMakeLists.txt b/lib/processor/s390x/CMakeLists.txt +new file mode 100644 +index 0000000..9e9c101 +--- /dev/null ++++ b/lib/processor/s390x/CMakeLists.txt +@@ -0,0 +1,4 @@ ++collect (PROJECT_LIB_HEADERS atomic.h) ++collect (PROJECT_LIB_HEADERS cpu.h) ++ ++# vim: expandtab:ts=2:sw=2:smartindent +diff --git a/lib/processor/s390x/atomic.h b/lib/processor/s390x/atomic.h +new file mode 100644 +index 0000000..f05c5c1 +--- /dev/null ++++ b/lib/processor/s390x/atomic.h +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * 3. Neither the name of Xilinx nor the names of its contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * @file gcc/atomic.h ++ * @brief GCC specific atomic primitives for libmetal. ++ */ ++ ++#ifndef __METAL_S390X_ATOMIC__H__ ++#define __METAL_S390X_ATOMIC__H__ ++ ++#endif /* __METAL_S390X_ATOMIC__H__ */ +diff --git a/lib/processor/s390x/cpu.h b/lib/processor/s390x/cpu.h +new file mode 100644 +index 0000000..2964b85 +--- /dev/null ++++ b/lib/processor/s390x/cpu.h +@@ -0,0 +1,41 @@ ++/* ++ * Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * 1. Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * 2. Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * 3. Neither the name of Xilinx nor the names of its contributors may be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * @file cpu.h ++ * @brief CPU specific primatives ++ */ ++ ++#ifndef __METAL_S390X_CPU__H__ ++#define __METAL_S390X_CPU__H__ ++ ++#define metal_cpu_yield() ++ ++#endif /* __METAL_S390X_CPU__H__ */ diff --git a/libmetal.spec b/libmetal.spec new file mode 100644 index 0000000..2ae8cda --- /dev/null +++ b/libmetal.spec @@ -0,0 +1,121 @@ +Name: libmetal +Version: 2020.10.0 +Release: 1%{?dist} +Summary: An abstraction layer across user-space Linux, baremetal, and RTOS environments + +License: BSD +URL: https://github.com/OpenAMP/libmetal/ +Source0: https://github.com/OpenAMP/libmetal/archive/v%{version}/%{name}-%{version}.tar.gz + +Patch0: libmetal-add-additional-arches.patch + +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: gcc +BuildRequires: glibc-devel +BuildRequires: libsysfs-devel + +%description +An abstraction layer across user-space Linux, baremetal, and RTOS environments. + +%package devel +Summary: Development files for libmetal +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +Development file for libmetal: An abstraction layer across user-space Linux, +baremetal, and RTOS environments. + +%package doc +Summary: Documentation files for libmetal +BuildArch: noarch +%description doc +Documentation file for libmetal: An abstraction layer across user-space Linux, +baremetal, and RTOS environments. + + +%prep +%autosetup -p1 + + +%build +mkdir build +cd build +%cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DWITH_STATIC_LIB=OFF .. + + +%install +cd build +%make_install + + +%ldconfig_scriptlets + +%files +%license LICENSE.md +%doc README.md +%{_bindir}/test-metal-shared +%{_libdir}/libmetal.so.0 +%{_libdir}/libmetal.so.0.1.0 + +%files devel +%{_libdir}/libmetal.so +%{_includedir}/metal/ + +%files doc +%license LICENSE.md +%doc README.md +%doc %{_datarootdir}/doc/metal/ + + +%changelog +* Tue Jan 26 2021 Zhenyu Zheng - 2020.10.0-1 +- Initial commit for openEuler + +* Tue Jan 26 2021 Fedora Release Engineering - 2020.10.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Nov 2 20:02:29 GMT 2020 Peter Robinson - 2020.10.0-1 +- Update to 2020.10.0 + +* Sat Aug 01 2020 Fedora Release Engineering - 2020.04.0-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 2020.04.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun May 10 2020 Peter Robinson - 2020.04.0-1 +- Update to 2020.04.0 + +* Thu Mar 05 2020 Peter Robinson - 2020.01.0-1 +- Update to 2020.01.0 + +* Wed Jan 29 2020 Fedora Release Engineering - 2018.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 2018.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 2018.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 21 2019 Peter Robinson 2018.10-1 +- Update to 2018.10 release + +* Sun Oct 14 2018 Peter Robinson 2018.04-1 +- Update to 2018.04 release + +* Fri Jul 13 2018 Fedora Release Engineering - 2017.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Feb 20 2018 Jared Smith - 2017.10-4 +- Add patch to build on other arches + +* Mon Feb 19 2018 Jared Smith - 2017.10-3 +- Make -doc subpackage a noarch package + +* Sat Feb 17 2018 Jared Smith - 2017.10-2 +- Fix up issues identified in package review + +* Tue Feb 13 2018 Jared K. Smith - 2017.10-1 +- Initial packaging