Skip to content
Snippets Groups Projects
Commit 359fe365 authored by Jakub Ružička's avatar Jakub Ružička
Browse files

distro: rename package to just apkg

parent 0725db61
No related branches found
No related tags found
1 merge request!149distro: Improve Debian packaging
Pipeline #114430 passed with warnings
......@@ -17,9 +17,9 @@ Build-Depends:
Standards-Version: 4.6.1
Homepage: https://gitlab.nic.cz/packaging/apkg
Package: python3-apkg
Package: apkg
Architecture: all
Provides: apkg
Provides: python3-apkg
Depends:
${misc:Depends},
${python3:Depends},
......
Name: apkg
Version: {{ version }}
Release: {{ release }}%{?dist}
Release: cznic.{{ release }}%{?dist}
Summary: cross-distro packaging automation tool
License: GPL 3.0
......@@ -10,26 +10,11 @@ Source0: %{name}-v%{version}.tar.gz
BuildArch: noarch
BuildRequires: git-core
Requires: python3-apkg == %{version}-%{release}
%description
Universal Free and Open Source minimalist cross-distro packaging automation
tool aimed at producing high quality packages for many different OS
distributions/packaging systems with minimum overhead.
This package contains apkg CLI executable.
%package -n python3-apkg
Summary: cross-distro packaging automation tool
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: git-core
Requires: rpm-build
Requires: python3-click
Requires: python3-distro
%if "x%{?suse_version}" == "x"
......@@ -40,17 +25,16 @@ Requires: python3-Jinja2
Requires: python3-requests
Requires: python3-toml
%description -n python3-apkg
Provides: python3-%{name} = %{version}-%{release}
%description
Universal Free and Open Source minimalist cross-distro packaging automation
tool aimed at producing high quality packages for many different OS
distributions/packaging systems with minimum overhead.
This package contains apkg module for Python 3.
%prep
%autosetup -n %{name}-v%{version} -S git
# blessed are in install_requires for PyPI, but they're optional for colors
# blessed is in install_requires for PyPI, but it's optional for colors
sed -i '/blessed/d' setup.cfg
%build
......@@ -59,13 +43,10 @@ sed -i '/blessed/d' setup.cfg
%install
%py3_install
%files -n apkg
%doc README.md
%{_bindir}/apkg
%files -n python3-apkg
%files
%doc README.md
%license COPYING
%{_bindir}/apkg
%{python3_sitelib}/apkg
%{python3_sitelib}/*.egg-info
......
......@@ -22,7 +22,7 @@ ARPATH=$OUTPATH/$ARCHIVE
if [[ $VERSION = *"dev"* ]]; then
# update version
sed -i "s/\(__version__ *= *'\)[^']\+'/\1$VERSION'/" apkg/__init__.py
sed -i "s/\(__version__ *= *'\)[^']\+'/\1$VERSION'/" apkg/__init__.py
git add apkg/__init__.py
if git commit -a -m "DROP: update __version__ = $VERSION"; then
# undo commit in the end
......@@ -30,6 +30,10 @@ if [[ $VERSION = *"dev"* ]]; then
git reset --hard HEAD^ >/dev/null
}
trap cleanup EXIT
else
echo "Failed to commit version changes :("
git reset --hard >/dev/null
exit 1
fi
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment