mirror of
https://github.com/DrasLorus/HLS_arbitrary_Precision_Types.git
synced 2024-07-03 21:35:16 +02:00
Update package helpers
This commit is contained in:
parent
8d77b77113
commit
084b5bbd8b
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -39,7 +39,9 @@
|
||||||
test
|
test
|
||||||
|
|
||||||
# packages
|
# packages
|
||||||
packages/tarball/*.tar.gz
|
packages/tarball/*
|
||||||
|
!packages/tarball/makefile
|
||||||
|
!packages/tarball/make_tarball.sh
|
||||||
|
|
||||||
packages/debian/*
|
packages/debian/*
|
||||||
!packages/debian/control
|
!packages/debian/control
|
||||||
|
|
17
packages/ap_fixed.h
Normal file
17
packages/ap_fixed.h
Normal file
|
@ -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 <ap_types/ap_fixed.h>
|
17
packages/ap_int.h
Normal file
17
packages/ap_int.h
Normal file
|
@ -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 <ap_types/ap_int.h>
|
|
@ -1,5 +1,5 @@
|
||||||
Package: hls-ap-types
|
Package: hls-ap-types
|
||||||
Version: 0.0.1
|
Version: 0.0.1.rc2
|
||||||
Maintainer: Camille 'DrasLorus' Monière <draslorus@draslorus.fr>
|
Maintainer: Camille 'DrasLorus' Monière <draslorus@draslorus.fr>
|
||||||
Depends:
|
Depends:
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,8 +1,30 @@
|
||||||
#! /bin/sh
|
#! /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
|
mkdir -p hls-ap-types_"$version"-1_all/DEBIAN
|
||||||
cp control hls-ap-types_"$version"-1_all/DEBIAN
|
cp control hls-ap-types_"$version"-1_all/DEBIAN
|
||||||
|
|
|
@ -1,28 +1,21 @@
|
||||||
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
# Maintainer: DrasLorus <draslorus@draslorus.fr>
|
||||||
# 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 <youremail@domain.com>
|
|
||||||
pkgname=hls-ap-types
|
pkgname=hls-ap-types
|
||||||
pkgver=0.0.1.rc1
|
pkgver=0.0.1.rc2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
|
|
||||||
pkgdesc="AP types for everyone"
|
pkgdesc="AP types for everyone"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://github.com/DrasLorus/HLS_arbitrary_Precision_Types"
|
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")
|
source=("https://github.com/DrasLorus/HLS_arbitrary_Precision_Types/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
||||||
|
|
||||||
sha256sums=('f3efea6d742bac7cb99d9b4b7ff718ce82a5f9c6d9f7a4334aca9750ad7cd9fd')
|
|
||||||
|
|
||||||
|
sha256sums=('90837e08801ab75f9084c6070a14ee60cae0d78b6a4bec47f1b49a4b9772b90d')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
|
|
||||||
_files="$(find include -name .h)"
|
|
||||||
|
|
||||||
make PREFIX="${pkgdir}" install
|
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"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,30 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
tar -cvzf hls-ap-types-0.0.1-RC1.tar.gz ../../include makefile ../../LICENSE.TXT
|
|
||||||
|
#
|
||||||
|
# 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
|
|
@ -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
|
all: install
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@install -dvm755 $(PREFIX)/usr/include/ap_types
|
install -dCm755 $(PREFIX)/usr/include/ap_types/etc
|
||||||
@install -vm644 -t $(PREFIX)/usr/include/ap_types/ $(files)
|
install -Cm644 -t $(PREFIX)/usr/include $(top_files)
|
||||||
@ln -vs ap_types/ap_fixed.h $(PREFIX)/usr/include/ap_fixed.h
|
install -Cm644 -t $(PREFIX)/usr/include/ap_types/ $(ap_types_files)
|
||||||
@ln -vs ap_types/ap_int.h $(PREFIX)/usr/include/ap_int.h
|
install -Cm644 -t $(PREFIX)/usr/include/ap_types/etc $(priv_files)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
unlink $(PREFIX)/usr/include/ap_fixed.h
|
rm $(PREFIX)/usr/include/ap_fixed.h
|
||||||
unlink $(PREFIX)/usr/include/ap_int.h
|
rm $(PREFIX)/usr/include/ap_int.h
|
||||||
@rm -rv $(PREFIX)/usr/include/ap_types
|
@rm -rv $(PREFIX)/usr/include/ap_types
|
Loading…
Reference in a new issue