diff --git a/epkg-0.1.0.tar.gz b/epkg-0.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b648f50170659230a8a7459b4805b92bd0293ec8 Binary files /dev/null and b/epkg-0.1.0.tar.gz differ diff --git a/epkg.spec b/epkg.spec new file mode 100644 index 0000000000000000000000000000000000000000..e6adaff4c52545adaf5ee9e0be9e788981cfe8a3 --- /dev/null +++ b/epkg.spec @@ -0,0 +1,48 @@ +Name: epkg +Version: 0.1.0 +Release: 1 +Summary: A new type of software package +License: MulanPSL-2.0+ +URL: https://gitee.com/openeuler/epkg +Source0: %{name}-%{version}.tar.gz +Source1: rootfs.tar.gz + +%if "%{_arch}" != "x86_64" && "%{_arch}" != "aarch64" +%error "Unsupported architecture: %{_arch}. Only x86_64 and aarch64 are supported." +exit 1 +%endif + +Requires: coreutils, tar + +%description +epkg is a new type of software package format developed by the openEuler community. It supports multiple environments and versions, addressing software package compatibility issues. + +%global epkg_cache /opt/epkg/cache +%global epkg_common /opt/epkg/users/public/envs/common/ + +%prep +%setup -q -b 0 -n %{name}-%{version} +%setup -q -b 1 -n rootfs + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{epkg_cache} +mv %{_builddir}/%{name}-%{version}/ %{buildroot}%{epkg_cache}/epkg-manager/ +mv %{_builddir}/rootfs/epkg-%{_arch} %{buildroot}%{epkg_cache}/ +mv %{_builddir}/rootfs/epkg-rootfs-%{_arch}.tar.gz %{buildroot}%{epkg_cache}/ +mv %{_builddir}/rootfs/epkg-helper-%{_arch} %{buildroot}%{epkg_cache}/ +mv %{_builddir}/rootfs/epkg-hash-%{_arch} %{buildroot}%{epkg_cache}/ +mv %{_builddir}/rootfs/elf-loader-%{_arch} %{buildroot}%{epkg_cache}/ + +%post +sh %{epkg_cache}/epkg-manager/bin/rpm-installer.sh + +%postun +sh %{epkg_common}/profile-1/usr/bin/epkg-uninstaller.sh + +%files +%{epkg_cache}/ + +%changelog +* Tue Feb 25 2025 rkingkoyo - 0.1.0-1 +- Initial package release \ No newline at end of file diff --git a/rootfs.tar.gz b/rootfs.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..48f9a9c1a09efa90b7a688feb41efde664627734 Binary files /dev/null and b/rootfs.tar.gz differ