diff --git a/.gitignore b/.gitignore index 14de5ca..e8d43e1 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,9 @@ test # packages -packages/tarball/*.tar.gz +packages/tarball/* +!packages/tarball/makefile +!packages/tarball/make_tarball.sh packages/debian/* !packages/debian/control diff --git a/packages/ap_fixed.h b/packages/ap_fixed.h new file mode 100644 index 0000000..663ba56 --- /dev/null +++ b/packages/ap_fixed.h @@ -0,0 +1,17 @@ +/* + * Copyright 2022 DrasLorus. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include \ No newline at end of file diff --git a/packages/ap_int.h b/packages/ap_int.h new file mode 100644 index 0000000..8c273a0 --- /dev/null +++ b/packages/ap_int.h @@ -0,0 +1,17 @@ +/* + * Copyright 2022 DrasLorus. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include diff --git a/packages/debian/control b/packages/debian/control index bcca208..f2b2703 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -1,5 +1,5 @@ Package: hls-ap-types -Version: 0.0.1 +Version: 0.0.1.rc2 Maintainer: Camille 'DrasLorus' Monière Depends: Architecture: all diff --git a/packages/debian/make_deb.sh b/packages/debian/make_deb.sh index 1a12d01..49014c6 100644 --- a/packages/debian/make_deb.sh +++ b/packages/debian/make_deb.sh @@ -1,8 +1,30 @@ #! /bin/sh -version="$(grep "Version" control | cut -d ' ' -f 2)" -mkdir -p hls-ap-types_"$version"-1_all/usr/include/ap_types -cp -r ../../include hls-ap-types_"$version"-1_all/usr/include/ap_types +# +# Copyright 2022 DrasLorus. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +version="$(grep "Version" control | cut -d ' ' -f 2)" +deb_dir="hls-ap-types_$version-1_all" +include_dir="$deb_dir/usr/include" +rm -rfv "$deb_dir" + +install -dm755 "$include_dir"/ap_types/etc +install -m644 -t "$include_dir"/ap_types ../../include/*.h +install -Dm644 -t "$include_dir"/ap_types/etc ../../include/etc/ap_private.h +install -m644 -t "$include_dir"/ ../ap_*.h mkdir -p hls-ap-types_"$version"-1_all/DEBIAN cp control hls-ap-types_"$version"-1_all/DEBIAN diff --git a/packages/hls-ap-types-arch/PKGBUILD b/packages/hls-ap-types-arch/PKGBUILD index 1e0ef6a..6230d2d 100644 --- a/packages/hls-ap-types-arch/PKGBUILD +++ b/packages/hls-ap-types-arch/PKGBUILD @@ -1,28 +1,21 @@ -# This is an example PKGBUILD file. Use this as a start to creating your own, -# and remove these comments. For more information, see 'man PKGBUILD'. -# NOTE: Please fill out the license field for your package! If it is unknown, -# then please put 'unknown'. - -# Maintainer: Your Name +# Maintainer: DrasLorus pkgname=hls-ap-types -pkgver=0.0.1.rc1 +pkgver=0.0.1.rc2 pkgrel=1 pkgdesc="AP types for everyone" arch=('any') url="https://github.com/DrasLorus/HLS_arbitrary_Precision_Types" -license=('apache2.0') +license=('Apache') -source=("$pkgname-$pkgver::https://github.com/DrasLorus/HLS_arbitrary_Precision_Types/releases/download/v0.0.1-RC1/hls-ap-types-0.0.1-RC1.tar.gz") - -sha256sums=('f3efea6d742bac7cb99d9b4b7ff718ce82a5f9c6d9f7a4334aca9750ad7cd9fd') +source=("https://github.com/DrasLorus/HLS_arbitrary_Precision_Types/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz") +sha256sums=('90837e08801ab75f9084c6070a14ee60cae0d78b6a4bec47f1b49a4b9772b90d') package() { cd "$srcdir" - - _files="$(find include -name .h)" make PREFIX="${pkgdir}" install - install -dvm644 "${pkgdir}/usr/share/licenses/hls-ap-types/LICENSE" LICENSE.txt + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" "${pkgname}-${pkgver}/LICENSE.TXT" } diff --git a/packages/tarball/make_tarball.sh b/packages/tarball/make_tarball.sh index 1148dce..ef4a6d1 100644 --- a/packages/tarball/make_tarball.sh +++ b/packages/tarball/make_tarball.sh @@ -1,2 +1,30 @@ #! /bin/sh -tar -cvzf hls-ap-types-0.0.1-RC1.tar.gz ../../include makefile ../../LICENSE.TXT \ No newline at end of file + +# +# Copyright 2022 DrasLorus. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +version="0.0.1.rc2" +tar_dir="hls-ap-types-$version" + +rm -rfv "$tar_dir" + +install -dm755 "$tar_dir"/ap_types/etc +install -m644 -t "$tar_dir"/ ../../LICENSE.TXT +install -m644 -t "$tar_dir"/ap_types ../../include/*.h +install -Dm644 -t "$tar_dir"/ap_types/etc ../../include/etc/ap_private.h +install -m644 -t "$tar_dir"/ ../ap_*.h + +tar -cvzf "$tar_dir".tar.gz "$tar_dir" makefile \ No newline at end of file diff --git a/packages/tarball/makefile b/packages/tarball/makefile index 9d6d1f8..aed169d 100644 --- a/packages/tarball/makefile +++ b/packages/tarball/makefile @@ -1,15 +1,34 @@ -files:=$(wildcard include/*.h) -files+=include/etc/ap_private.h +# +# Copyright 2022 DrasLorus. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +tar_dir=hls-ap-types-0.0.1.rc2 + +ap_types_files:=$(wildcard $(tar_dir)/ap_types/*.h) +top_files:=$(wildcard $(tar_dir)/*.h) +priv_files:=$(wildcard $(tar_dir)/ap_types/etc/*.h) all: install install: - @install -dvm755 $(PREFIX)/usr/include/ap_types - @install -vm644 -t $(PREFIX)/usr/include/ap_types/ $(files) - @ln -vs ap_types/ap_fixed.h $(PREFIX)/usr/include/ap_fixed.h - @ln -vs ap_types/ap_int.h $(PREFIX)/usr/include/ap_int.h + install -dCm755 $(PREFIX)/usr/include/ap_types/etc + install -Cm644 -t $(PREFIX)/usr/include $(top_files) + install -Cm644 -t $(PREFIX)/usr/include/ap_types/ $(ap_types_files) + install -Cm644 -t $(PREFIX)/usr/include/ap_types/etc $(priv_files) uninstall: - unlink $(PREFIX)/usr/include/ap_fixed.h - unlink $(PREFIX)/usr/include/ap_int.h + rm $(PREFIX)/usr/include/ap_fixed.h + rm $(PREFIX)/usr/include/ap_int.h @rm -rv $(PREFIX)/usr/include/ap_types \ No newline at end of file